html_content = '''<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/vanna.svg" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link href="https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@350&display=swap" rel="stylesheet">
    <script src="https://cdn.plot.ly/plotly-latest.min.js" type="text/javascript"></script>
    <title>Vanna.AI</title>
    <script type="module" crossorigin src="/assets/index-2dc047a4.js"></script>
    <link rel="stylesheet" href="/assets/index-a3ae634d.css">
  </head>
  <body class="bg-white dark:bg-slate-900">
    <div id="app"></div>
    
  </body>
</html>
'''

css_content = '''.nav-title{font-family:Roboto Slab,serif}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-px{left:1px;right:1px}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.bottom-px{bottom:1px}.end-0{inset-inline-end:0px}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-10{z-index:10}.z-50{z-index:50}.z-\\[60\\]{z-index:60}.z-\\[80\\]{z-index:80}.-m-1{margin:-.25rem}.-m-1\\.5{margin:-.375rem}.m-1{margin:.25rem}.m-3{margin:.75rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-2\\.5{margin-bottom:.625rem}.mb-3{margin-bottom:.75rem}.mb-auto{margin-bottom:auto}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.mr-1{margin-right:.25rem}.mr-1\\.5{margin-right:.375rem}.mr-3{margin-right:.75rem}.ms-0{margin-inline-start:0px}.ms-3{margin-inline-start:.75rem}.mt-0{margin-top:0}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-2\\.5{margin-top:.625rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-7{margin-top:1.75rem}.mt-auto{margin-top:auto}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1{height:.25rem}.h-1\\.5{height:.375rem}.h-3{height:.75rem}.h-3\\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-52{height:13rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-\\[2\\.375rem\\]{height:2.375rem}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.min-h-\\[15rem\\]{min-height:15rem}.min-h-\\[calc\\(100\\%-3\\.5rem\\)\\]{min-height:calc(100% - 3.5rem)}.w-0{width:0px}.w-1{width:.25rem}.w-1\\.5{width:.375rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\\.5{width:.875rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-\\[2\\.375rem\\]{width:2.375rem}.w-\\[3\\.25rem\\]{width:3.25rem}.w-full{width:100%}.w-px{width:1px}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-7xl{max-width:80rem}.max-w-\\[50rem\\]{max-width:50rem}.max-w-\\[85rem\\]{max-width:85rem}.max-w-fit{max-width:-moz-fit-content;max-width:fit-content}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-disc{list-style-type:disc}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-y-4{row-gap:1rem}.-space-y-px>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(-1px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(-1px * var(--tw-space-y-reverse))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.whitespace-break-spaces{white-space:break-spaces}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b-md{border-bottom-right-radius:.375rem;border-bottom-left-radius:.375rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.rounded-ee-xl{border-end-end-radius:.75rem}.rounded-es-xl{border-end-start-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-\\[3px\\]{border-width:3px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-r{border-right-width:1px}.border-s{border-inline-start-width:1px}.border-t{border-top-width:1px}.border-t-2{border-top-width:2px}.border-t-4{border-top-width:4px}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity))}.border-current{border-color:currentColor}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity))}.border-neutral-700{--tw-border-opacity: 1;border-color:rgb(64 64 64 / var(--tw-border-opacity))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.border-red-600{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity))}.border-teal-100{--tw-border-opacity: 1;border-color:rgb(204 251 241 / var(--tw-border-opacity))}.border-teal-500{--tw-border-opacity: 1;border-color:rgb(20 184 166 / var(--tw-border-opacity))}.border-teal-900{--tw-border-opacity: 1;border-color:rgb(19 78 74 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-yellow-200{--tw-border-opacity: 1;border-color:rgb(254 240 138 / var(--tw-border-opacity))}.border-t-blue-500{--tw-border-opacity: 1;border-top-color:rgb(59 130 246 / var(--tw-border-opacity))}.border-t-blue-600{--tw-border-opacity: 1;border-top-color:rgb(37 99 235 / var(--tw-border-opacity))}.border-t-green-500{--tw-border-opacity: 1;border-top-color:rgb(34 197 94 / var(--tw-border-opacity))}.border-t-green-600{--tw-border-opacity: 1;border-top-color:rgb(22 163 74 / var(--tw-border-opacity))}.border-t-red-500{--tw-border-opacity: 1;border-top-color:rgb(239 68 68 / var(--tw-border-opacity))}.border-t-red-600{--tw-border-opacity: 1;border-top-color:rgb(220 38 38 / var(--tw-border-opacity))}.border-t-transparent{border-top-color:transparent}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity))}.bg-neutral-800{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity))}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity))}.bg-teal-200{--tw-bg-opacity: 1;background-color:rgb(153 246 228 / var(--tw-bg-opacity))}.bg-teal-50{--tw-bg-opacity: 1;background-color:rgb(240 253 250 / var(--tw-bg-opacity))}.bg-teal-800{--tw-bg-opacity: 1;background-color:rgb(17 94 89 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-opacity-80{--tw-bg-opacity: .8}.p-1{padding:.25rem}.p-1\\.5{padding:.375rem}.p-2{padding:.5rem}.p-2\\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pb-12{padding-bottom:3rem}.pe-11{padding-inline-end:2.75rem}.pe-3{padding-inline-end:.75rem}.pl-3{padding-left:.75rem}.pl-7{padding-left:1.75rem}.pr-10{padding-right:2.5rem}.pr-4{padding-right:1rem}.pr-9{padding-right:2.25rem}.ps-5{padding-inline-start:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-start{text-align:start}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-7xl{font-size:4.5rem;line-height:1}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-none{line-height:1}.tracking-wide{letter-spacing:.025em}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-neutral-200{--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}.text-neutral-300{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity))}.text-neutral-400{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.text-neutral-500{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity))}.text-teal-400{--tw-text-opacity: 1;color:rgb(45 212 191 / var(--tw-text-opacity))}.text-teal-800{--tw-text-opacity: 1;color:rgb(17 94 89 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity))}.decoration-2{text-decoration-thickness:2px}.opacity-0{opacity:0}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-neutral-700{--tw-shadow-color: #404040;--tw-shadow: var(--tw-shadow-colored)}.shadow-slate-700{--tw-shadow-color: #334155;--tw-shadow: var(--tw-shadow-colored)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-transparent{--tw-ring-color: transparent}.ring-offset-white{--tw-ring-offset-color: #fff}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.\\[--body-scroll\\:true\\]{--body-scroll: true}.marker\\:text-blue-600 *::marker{color:#2563eb}.marker\\:text-blue-600::marker{color:#2563eb}.before\\:inline-block:before{content:var(--tw-content);display:inline-block}.before\\:h-6:before{content:var(--tw-content);height:1.5rem}.before\\:w-6:before{content:var(--tw-content);width:1.5rem}.before\\:translate-x-0:before{content:var(--tw-content);--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.before\\:transform:before{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.before\\:rounded-full:before{content:var(--tw-content);border-radius:9999px}.before\\:bg-white:before{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.before\\:shadow:before{content:var(--tw-content);--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.before\\:ring-0:before{content:var(--tw-content);--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.before\\:transition:before{content:var(--tw-content);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.before\\:duration-200:before{content:var(--tw-content);transition-duration:.2s}.before\\:ease-in-out:before{content:var(--tw-content);transition-timing-function:cubic-bezier(.4,0,.2,1)}.first\\:mt-0:first-child{margin-top:0}.first\\:rounded-t-lg:first-child{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.last\\:rounded-b-lg:last-child{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.checked\\:bg-blue-600:checked{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.checked\\:bg-none:checked{background-image:none}.checked\\:before\\:translate-x-full:checked:before{content:var(--tw-content);--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.checked\\:before\\:bg-blue-200:checked:before{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity))}.hover\\:border-blue-500:hover{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.hover\\:border-green-500:hover{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity))}.hover\\:border-red-400:hover{--tw-border-opacity: 1;border-color:rgb(248 113 113 / var(--tw-border-opacity))}.hover\\:border-red-500:hover{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.hover\\:bg-blue-50:hover{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity))}.hover\\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.hover\\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.hover\\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.hover\\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\\:bg-green-500:hover{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity))}.hover\\:bg-red-500:hover{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.hover\\:text-blue-500:hover{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.hover\\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.hover\\:text-blue-800:hover{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity))}.hover\\:text-gray-400:hover{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.hover\\:text-green-800:hover{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity))}.hover\\:text-red-400:hover{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.hover\\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.hover\\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.focus\\:z-10:focus{z-index:10}.focus\\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.focus\\:border-blue-600:focus{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity))}.focus\\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\\:ring-blue-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(37 99 235 / var(--tw-ring-opacity))}.focus\\:ring-gray-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(156 163 175 / var(--tw-ring-opacity))}.focus\\:ring-green-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(187 247 208 / var(--tw-ring-opacity))}.focus\\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\\:ring-red-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(254 202 202 / var(--tw-ring-opacity))}.focus\\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus\\:ring-offset-white:focus{--tw-ring-offset-color: #fff}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:opacity-50:disabled{opacity:.5}[data-hs-tab].active.hs-tab-active\\:border-blue-600{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity))}[data-hs-tab].active.hs-tab-active\\:font-semibold{font-weight:600}[data-hs-tab].active.hs-tab-active\\:text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}[data-hs-tab].active .hs-tab-active\\:border-blue-600{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity))}[data-hs-tab].active .hs-tab-active\\:font-semibold{font-weight:600}[data-hs-tab].active .hs-tab-active\\:text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.open.hs-overlay-open\\:mt-7{margin-top:1.75rem}.open.hs-overlay-open\\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.open.hs-overlay-open\\:opacity-100{opacity:1}.open.hs-overlay-open\\:duration-500{transition-duration:.5s}.open .hs-overlay-open\\:mt-7{margin-top:1.75rem}.open .hs-overlay-open\\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.open .hs-overlay-open\\:opacity-100{opacity:1}.open .hs-overlay-open\\:duration-500{transition-duration:.5s}@media (prefers-color-scheme: dark){.dark\\:divide-gray-700>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(55 65 81 / var(--tw-divide-opacity))}.dark\\:border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.dark\\:border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.dark\\:border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.dark\\:border-neutral-700{--tw-border-opacity: 1;border-color:rgb(64 64 64 / var(--tw-border-opacity))}.dark\\:border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.dark\\:border-teal-900{--tw-border-opacity: 1;border-color:rgb(19 78 74 / var(--tw-border-opacity))}.dark\\:border-t-blue-500{--tw-border-opacity: 1;border-top-color:rgb(59 130 246 / var(--tw-border-opacity))}.dark\\:border-t-green-500{--tw-border-opacity: 1;border-top-color:rgb(34 197 94 / var(--tw-border-opacity))}.dark\\:border-t-red-500{--tw-border-opacity: 1;border-top-color:rgb(239 68 68 / var(--tw-border-opacity))}.dark\\:bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\\:bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark\\:bg-neutral-800{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\\:bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.dark\\:bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity))}.dark\\:bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity))}.dark\\:bg-teal-800{--tw-bg-opacity: 1;background-color:rgb(17 94 89 / var(--tw-bg-opacity))}.dark\\:bg-teal-800\\/30{background-color:#115e594d}.dark\\:bg-opacity-80{--tw-bg-opacity: .8}.dark\\:text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.dark\\:text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.dark\\:text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.dark\\:text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.dark\\:text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.dark\\:text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.dark\\:text-neutral-200{--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}.dark\\:text-neutral-400{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\\:text-neutral-500{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.dark\\:text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.dark\\:text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.dark\\:text-teal-400{--tw-text-opacity: 1;color:rgb(45 212 191 / var(--tw-text-opacity))}.dark\\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\\:placeholder-gray-400::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\\:placeholder-gray-400::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\\:placeholder-neutral-500::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(115 115 115 / var(--tw-placeholder-opacity))}.dark\\:placeholder-neutral-500::placeholder{--tw-placeholder-opacity: 1;color:rgb(115 115 115 / var(--tw-placeholder-opacity))}.dark\\:shadow-neutral-700\\/70{--tw-shadow-color: rgb(64 64 64 / .7);--tw-shadow: var(--tw-shadow-colored)}.dark\\:shadow-slate-700\\/\\[\\.7\\]{--tw-shadow-color: rgb(51 65 85 / .7);--tw-shadow: var(--tw-shadow-colored)}.dark\\:before\\:bg-gray-400:before{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.dark\\:checked\\:border-blue-500:checked{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.dark\\:checked\\:bg-blue-500:checked{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.dark\\:checked\\:bg-blue-600:checked{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.dark\\:checked\\:before\\:bg-blue-200:checked:before{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity))}.dark\\:hover\\:border-blue-400:hover{--tw-border-opacity: 1;border-color:rgb(96 165 250 / var(--tw-border-opacity))}.dark\\:hover\\:border-red-400:hover{--tw-border-opacity: 1;border-color:rgb(248 113 113 / var(--tw-border-opacity))}.dark\\:hover\\:bg-gray-900:hover{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.dark\\:hover\\:bg-neutral-700:hover{--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity))}.dark\\:hover\\:bg-slate-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity))}.dark\\:hover\\:text-blue-400:hover{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity))}.dark\\:hover\\:text-blue-500:hover{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.dark\\:hover\\:text-green-400:hover{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity))}.dark\\:hover\\:text-red-400:hover{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.dark\\:hover\\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.dark\\:hover\\:text-slate-300:hover{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity))}.dark\\:hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\\:focus\\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.dark\\:focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.dark\\:focus\\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.dark\\:focus\\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.dark\\:focus\\:ring-gray-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}.dark\\:focus\\:ring-gray-700:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity))}.dark\\:focus\\:ring-neutral-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(82 82 82 / var(--tw-ring-opacity))}.dark\\:focus\\:ring-red-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity))}.dark\\:focus\\:ring-offset-gray-800:focus{--tw-ring-offset-color: #1f2937}}@media (min-width: 640px){.sm\\:mx-auto{margin-left:auto;margin-right:auto}.sm\\:mb-3{margin-bottom:.75rem}.sm\\:mt-10{margin-top:2.5rem}.sm\\:w-auto{width:auto}.sm\\:w-full{width:100%}.sm\\:max-w-lg{max-width:32rem}.sm\\:flex-row{flex-direction:row}.sm\\:gap-3{gap:.75rem}.sm\\:gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.sm\\:space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.sm\\:p-4{padding:1rem}.sm\\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\\:py-4{padding-top:1rem;padding-bottom:1rem}.sm\\:py-6{padding-top:1.5rem;padding-bottom:1.5rem}.sm\\:text-3xl{font-size:1.875rem;line-height:2.25rem}.sm\\:text-4xl{font-size:2.25rem;line-height:2.5rem}.sm\\:text-9xl{font-size:8rem;line-height:1}.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\\:flex{display:flex}.md\\:items-center{align-items:center}.md\\:justify-between{justify-content:space-between}.md\\:p-10{padding:2.5rem}.md\\:p-5{padding:1.25rem}}@media (min-width: 1024px){.lg\\:bottom-0{bottom:0}.lg\\:right-auto{right:auto}.lg\\:block{display:block}.lg\\:hidden{display:none}.lg\\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\\:px-8{padding-left:2rem;padding-right:2rem}.lg\\:py-14{padding-top:3.5rem;padding-bottom:3.5rem}.lg\\:pl-64{padding-left:16rem}}
'''

js_content = '''var tn=Object.defineProperty;var Tn=(E,e,T)=>e in E?tn(E,e,{enumerable:!0,configurable:!0,writable:!0,value:T}):E[e]=T;var Wt=(E,e,T)=>(Tn(E,typeof e!="symbol"?e+"":e,T),T);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))t(r);new MutationObserver(r=>{for(const R of r)if(R.type==="childList")for(const A of R.addedNodes)A.tagName==="LINK"&&A.rel==="modulepreload"&&t(A)}).observe(document,{childList:!0,subtree:!0});function T(r){const R={};return r.integrity&&(R.integrity=r.integrity),r.referrerPolicy&&(R.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?R.credentials="include":r.crossOrigin==="anonymous"?R.credentials="omit":R.credentials="same-origin",R}function t(r){if(r.ep)return;r.ep=!0;const R=T(r);fetch(r.href,R)}})();function Z(){}function rn(E,e){for(const T in e)E[T]=e[T];return E}function CR(E){return E()}function FT(){return Object.create(null)}function iE(E){E.forEach(CR)}function ZE(E){return typeof E=="function"}function Ne(E,e){return E!=E?e==e:E!==e||E&&typeof E=="object"||typeof E=="function"}let Lt;function YT(E,e){return E===e?!0:(Lt||(Lt=document.createElement("a")),Lt.href=e,E===Lt.href)}function Rn(E){return Object.keys(E).length===0}function uR(E,...e){if(E==null){for(const t of e)t(void 0);return Z}const T=E.subscribe(...e);return T.unsubscribe?()=>T.unsubscribe():T}function cE(E){let e;return uR(E,T=>e=T)(),e}function RE(E,e,T){E.$$.on_destroy.push(uR(e,T))}function pt(E,e,T,t){if(E){const r=cR(E,e,T,t);return E[0](r)}}function cR(E,e,T,t){return E[1]&&t?rn(T.ctx.slice(),E[1](t(e))):T.ctx}function Mt(E,e,T,t){if(E[2]&&t){const r=E[2](t(T));if(e.dirty===void 0)return r;if(typeof r=="object"){const R=[],A=Math.max(e.dirty.length,r.length);for(let s=0;s<A;s+=1)R[s]=e.dirty[s]|r[s];return R}return e.dirty|r}return e.dirty}function Ut(E,e,T,t,r,R){if(r){const A=cR(e,T,t,R);E.p(A,r)}}function mt(E){if(E.ctx.length>32){const e=[],T=E.ctx.length/32;for(let t=0;t<T;t++)e[t]=-1;return e}return-1}function l(E,e){E.appendChild(e)}function W(E,e,T){E.insertBefore(e,T||null)}function Y(E){E.parentNode&&E.parentNode.removeChild(E)}function nE(E,e){for(let T=0;T<E.length;T+=1)E[T]&&E[T].d(e)}function P(E){return document.createElement(E)}function OE(E){return document.createElementNS("http://www.w3.org/2000/svg",E)}function Re(E){return document.createTextNode(E)}function x(){return Re(" ")}function Ze(){return Re("")}function ae(E,e,T,t){return E.addEventListener(e,T,t),()=>E.removeEventListener(e,T,t)}function i(E,e,T){T==null?E.removeAttribute(e):E.getAttribute(e)!==T&&E.setAttribute(e,T)}function nn(E){let e;return{p(...T){e=T,e.forEach(t=>E.push(t))},r(){e.forEach(T=>E.splice(E.indexOf(T),1))}}}function An(E){return Array.from(E.childNodes)}function Pe(E,e){e=""+e,E.data!==e&&(E.data=e)}function Ye(E,e){E.value=e??""}function Ct(E,e,T,t){T==null?E.style.removeProperty(e):E.style.setProperty(e,T,t?"important":"")}function VT(E,e,T){for(let t=0;t<E.options.length;t+=1){const r=E.options[t];if(r.__value===e){r.selected=!0;return}}(!T||e!==void 0)&&(E.selectedIndex=-1)}function sn(E){const e=E.querySelector(":checked");return e&&e.__value}let ot;function At(E){ot=E}function Sn(){if(!ot)throw new Error("Function called outside component initialization");return ot}function fR(E){Sn().$$.on_mount.push(E)}const QE=[],oT=[];let jE=[];const OT=[],on=Promise.resolve();let iT=!1;function On(){iT||(iT=!0,on.then(PR))}function Pt(E){jE.push(E)}function an(E){OT.push(E)}const wt=new Set;let kE=0;function PR(){if(kE!==0)return;const E=ot;do{try{for(;kE<QE.length;){const e=QE[kE];kE++,At(e),In(e.$$)}}catch(e){throw QE.length=0,kE=0,e}for(At(null),QE.length=0,kE=0;oT.length;)oT.pop()();for(let e=0;e<jE.length;e+=1){const T=jE[e];wt.has(T)||(wt.add(T),T())}jE.length=0}while(QE.length);for(;OT.length;)OT.pop()();iT=!1,wt.clear(),At(E)}function In(E){if(E.fragment!==null){E.update(),iE(E.before_update);const e=E.dirty;E.dirty=[-1],E.fragment&&E.fragment.p(E.ctx,e),E.after_update.forEach(Pt)}}function Nn(E){const e=[],T=[];jE.forEach(t=>E.indexOf(t)===-1?e.push(t):T.push(t)),T.forEach(t=>t()),jE=e}const ut=new Set;let BE;function Ge(){BE={r:0,c:[],p:BE}}function ge(){BE.r||iE(BE.c),BE=BE.p}function G(E,e){E&&E.i&&(ut.delete(E),E.i(e))}function B(E,e,T,t){if(E&&E.o){if(ut.has(E))return;ut.add(E),BE.c.push(()=>{ut.delete(E),t&&(T&&E.d(1),t())}),E.o(e)}else t&&t()}function ce(E){return(E==null?void 0:E.length)!==void 0?E:Array.from(E)}function ln(E,e){E.d(1),e.delete(E.key)}function _n(E,e,T,t,r,R,A,s,o,n,S,O){let N=E.length,u=R.length,D=N;const d={};for(;D--;)d[E[D].key]=D;const C=[],_=new Map,L=new Map,c=[];for(D=u;D--;){const a=O(r,R,D),I=T(a);let f=A.get(I);f?t&&c.push(()=>f.p(a,e)):(f=n(I,a),f.c()),_.set(I,C[D]=f),I in d&&L.set(I,Math.abs(D-d[I]))}const H=new Set,y=new Set;function h(a){G(a,1),a.m(s,S),A.set(a.key,a),S=a.first,u--}for(;N&&u;){const a=C[u-1],I=E[N-1],f=a.key,m=I.key;a===I?(S=a.first,N--,u--):_.has(m)?!A.has(f)||H.has(f)?h(a):y.has(m)?N--:L.get(f)>L.get(m)?(y.add(f),h(a)):(H.add(m),N--):(o(I,A),N--)}for(;N--;){const a=E[N];_.has(a.key)||o(a,A)}for(;u;)h(C[u-1]);return iE(c),C}function Ln(E,e,T){const t=E.$$.props[e];t!==void 0&&(E.$$.bound[t]=T,T(E.$$.ctx[t]))}function k(E){E&&E.c()}function $(E,e,T){const{fragment:t,after_update:r}=E.$$;t&&t.m(e,T),Pt(()=>{const R=E.$$.on_mount.map(CR).filter(ZE);E.$$.on_destroy?E.$$.on_destroy.push(...R):iE(R),E.$$.on_mount=[]}),r.forEach(Pt)}function X(E,e){const T=E.$$;T.fragment!==null&&(Nn(T.after_update),iE(T.on_destroy),T.fragment&&T.fragment.d(e),T.on_destroy=T.fragment=null,T.ctx=[])}function Cn(E,e){E.$$.dirty[0]===-1&&(QE.push(E),On(),E.$$.dirty.fill(0)),E.$$.dirty[e/31|0]|=1<<e%31}function _e(E,e,T,t,r,R,A,s=[-1]){const o=ot;At(E);const n=E.$$={fragment:null,ctx:[],props:R,update:Z,not_equal:r,bound:FT(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(o?o.$$.context:[])),callbacks:FT(),dirty:s,skip_bound:!1,root:e.target||o.$$.root};A&&A(n.root);let S=!1;if(n.ctx=T?T(E,e.props||{},(O,N,...u)=>{const D=u.length?u[0]:N;return n.ctx&&r(n.ctx[O],n.ctx[O]=D)&&(!n.skip_bound&&n.bound[O]&&n.bound[O](D),S&&Cn(E,O)),N}):[],n.update(),S=!0,iE(n.before_update),n.fragment=t?t(n.ctx):!1,e.target){if(e.hydrate){const O=An(e.target);n.fragment&&n.fragment.l(O),O.forEach(Y)}else n.fragment&&n.fragment.c();e.intro&&G(E.$$.fragment),$(E,e.target,e.anchor),PR()}At(o)}class Le{constructor(){Wt(this,"$$");Wt(this,"$$set")}$destroy(){X(this,1),this.$destroy=Z}$on(e,T){if(!ZE(T))return Z;const t=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return t.push(T),()=>{const r=t.indexOf(T);r!==-1&&t.splice(r,1)}}$set(e){this.$$set&&!Rn(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const un="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(un);const KE=[];function aE(E,e=Z){let T;const t=new Set;function r(s){if(Ne(E,s)&&(E=s,T)){const o=!KE.length;for(const n of t)n[1](),KE.push(n,E);if(o){for(let n=0;n<KE.length;n+=2)KE[n][0](KE[n+1]);KE.length=0}}}function R(s){r(s(E))}function A(s,o=Z){const n=[s,o];return t.add(n),t.size===1&&(T=e(r,R)||Z),s(E),()=>{t.delete(n),t.size===0&&T&&(T(),T=null)}}return{set:r,update:R,subscribe:A}}let GE=aE(""),Et=aE([]),lT=aE(null),ht=aE(null),Gt=aE(!1),st=aE(!1),DE=aE("chat"),_T=aE([]),zE=aE(""),DR=aE(!1),FE=aE({debug:!0,logo:"",title:"Welcome to Vanna.AI",subtitle:"Loading...",show_training_data:!0,suggested_questions:!0,sql:!0,table:!0,csv_download:!0,chart:!0,redraw_chart:!0,auto_fix_sql:!0,ask_results_correct:!0,followup_questions:!0,summarization:!0,function_generation:!0}),gt=aE(null),dR=aE([]);function Ht(){Et.set([]),Gt.set(!1),st.set(!1)}async function LT(E){Ht();let e=cE(FE);Se({type:"user_question",question:E}),Gt.set(!0);const T=await fe("get_function","GET",{question:E});let t;if(e.function_generation&&T.type==="function")Se(T),t=T.id,GE.set(T.id),zE.set(T.function.instantiated_sql);else{const R=await fe("generate_sql","GET",{question:E});if(Se(R),R.type!=="sql")return;window.location.hash=R.id,GE.set(R.id),zE.set(R.text),t=R.id}const r=await fe("run_sql","GET",{id:t});if(Se(r),r.type==="df"){if(r.should_generate_chart){const R=await fe("generate_plotly_figure","GET",{id:r.id});if(Se(R),R.type!=="plotly_figure")return;_T.update(A=>[...A,{question:E,id:R.id}])}if(e.summarization){const R=await fe("generate_summary","GET",{id:t});Se(R)}Se({type:"feedback_question"}),Se({type:"feedback_buttons"})}}async function cn(E){let e=cE(FE);if(Se(E),E.type!=="sql")return;window.location.hash=E.id,GE.set(E.id),zE.set(E.text);const T=await fe("run_sql","GET",{id:E.id});if(Se(T),T.type!=="df")return;const t=await fe("generate_plotly_figure","GET",{id:T.id});if(Se(t),t.type==="plotly_figure"){if(e.summarization){const r=await fe("generate_summary","GET",{id:t.id});Se(r)}Se({type:"feedback_question"}),Se({type:"feedback_buttons"})}}function fn(E){Se({type:"user_question",question:"Re-run the SQL"}),fe("run_sql","GET",{id:E}).then(Se).then(e=>{e.type==="df"&&fe("generate_plotly_figure","GET",{id:e.id}).then(Se).then(T=>{T.type==="plotly_figure"&&fe("generate_followup_questions","GET",{id:T.id}).then(Se)})})}function Pn(){fe("get_question_history","GET",[]).then(hn)}function Dn(){fe("get_config","GET",[]).then(mn)}function CT(){window.location.hash="functions",DE.set("functions"),fe("get_all_functions","GET",[]).then(Mn)}function pR(){window.location.hash="training-data",DE.set("training-data"),fe("get_training_data","GET",[]).then(Dt)}function uT(){window.location.hash="",DE.set("chat"),Ht(),cE(lT)===null&&fe("generate_questions","GET",[]).then(Un)}function dn(E){window.location.hash=E,DE.set("chat"),Ht(),Gt.set(!0),fe("load_question","GET",{id:E}).then(Se)}function pn(E){ht.set(null),fe("remove_training_data","POST",{id:E}).then(e=>{fe("get_training_data","GET",[]).then(Dt)})}function Se(E){return E.type==="not_logged_in"?(gt.set(E.html),DE.set("login"),E):(Et.update(e=>[...e,E]),gn(),E)}function Dt(E){return ht.set(E),E.type==="df"?JSON.parse(E.df).length===0&&DE.set("no-training-data"):E.type==="not_logged_in"&&(gt.set(E.html),DE.set("login")),E}function Mn(E){return E.type==="functions"&&dR.set(E.functions),E}function Un(E){return lT.set(E),E}function mn(E){return E.type==="config"?(FE.set(E.config),E.config.debug&&Wn()):E.type==="not_logged_in"&&(gt.set(E.html),DE.set("login")),E}function hn(E){return E.type==="question_history"&&_T.set(E.questions),E}function Gn(E,e){ht.set(null);let T={};T[e]=E,fe("train","POST",T).then(Dt).then(t=>{t.type!=="error"&&fe("get_training_data","GET",[]).then(Dt)})}async function fe(E,e,T){try{st.set(!0);let t="",r;if(e==="GET")t=Object.entries(T).filter(([A,s])=>A!=="endpoint"&&A!=="addMessage").map(([A,s])=>`${encodeURIComponent(A)}=${encodeURIComponent(s)}`).join("&"),r=await fetch(`/api/v0/${E}?${t}`);else{let A=JSON.stringify(T);r=await fetch(`/api/v0/${E}`,{method:"POST",headers:{"Content-Type":"application/json"},body:A})}if(!r.ok)throw new Error("The server returned an error. See the server logs for more details. If you are running in Colab, this function is probably not supported. Please try running in a local environment.");const R=await r.json();return st.set(!1),R}catch(t){return st.set(!1),{type:"error",error:String(t)}}}function gn(){setTimeout(()=>{window.scrollTo({top:document.body.scrollHeight,behavior:"smooth"})},100)}function cT(){let E=cE(Et),e=E.find(T=>T.type==="user_question");if(e&&e.type==="user_question"){let T=E.findLast(t=>t.type==="sql");if(T&&T.type==="sql")return{question:e.question,sql:T.text}}return null}function Ot(E){Et.update(e=>e.filter(T=>T.type!==E))}function Hn(E){fe("fix_sql","POST",{id:cE(GE),error:E}).then(cn)}function bn(E){let T=cE(Et).find(t=>t.type==="user_question");T&&T.type==="user_question"&&(fe("update_sql","POST",{id:cE(GE),sql:E}).then(Se).then(t=>{t.type==="sql"&&(zE.set(t.text),fe("run_sql","GET",{id:t.id}).then(Se).then(r=>{r.type==="df"?JSON.parse(r.df).length>1?fe("generate_plotly_figure","GET",{id:r.id}).then(Se).then(A=>{Se({type:"feedback_question"}),Se({type:"feedback_buttons"})}):(Se({type:"feedback_question"}),Se({type:"feedback_buttons"})):(Se({type:"feedback_question"}),Se({type:"feedback_buttons"}))}))}),Ot("user_sql"))}function yn(){Se({type:"chart_modification"})}function Bn(){Ot("feedback_buttons"),Se({type:"feedback_correct"}),cT()?fe("create_function","GET",{id:cE(GE)}).then(Se):console.log("No Question-SQL Found")}function vn(E,e){fe("update_function","POST",{old_function_name:E,updated_function:e})}function Fn(E){fe("delete_function","POST",{function_name:E}).finally(()=>{CT()})}function Yn(){Ot("feedback_buttons"),Se({type:"feedback_correct"});let E=cT();E&&(fe("train","POST",E),fe("generate_followup_questions","GET",{id:cE(GE)}).then(Se))}function WT(){Ot("feedback_buttons"),Se({type:"feedback_incorrect"}),Se({type:"user_sql"})}function Vn(E){Ot("chart_modification"),Se({type:"user_question",question:"Update the chart with these instructions: "+E}),fe("generate_plotly_figure","GET",{id:cE(GE),chart_instructions:E}).then(Se)}function Wn(){var E=new WebSocket("ws://"+window.location.host+"/api/v0/log");E.onopen=function(){console.log("Connected to WebSocket server at /log.")},E.onmessage=function(e){console.log("Received message:",e.data);try{var T=JSON.parse(e.data)}catch(r){console.error("Error parsing JSON:",r);return}var t=document.getElementById("log-contents");t&&(t.innerHTML+="<details> <summary>"+T.title+"</summary> "+JSON.stringify(T.message)+"</details> <br>")},E.onclose=function(e){console.log("WebSocket connection closed:",e)},E.onerror=function(e){console.error("WebSocket error:",e)}}function wT(E,e,T){const t=E.slice();return t[3]=e[T],t}function xT(E){let e,T,t,r;return{c(){e=P("li"),T=P("button"),T.innerHTML=`<svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M4.26 10.147a60.436 60.436 0 00-.491 6.347A48.627 48.627 0 0112 20.904a48.627 48.627 0 018.232-4.41 60.46 60.46 0 00-.491-6.347m-15.482 0a50.57 50.57 0 00-2.658-.813A59.905 59.905 0 0112 3.493a59.902 59.902 0 0110.399 5.84c-.896.248-1.783.52-2.658.814m-15.482 0A50.697 50.697 0 0112 13.489a50.702 50.702 0 017.74-3.342M6.75 15a.75.75 0 100-1.5.75.75 0 000 1.5zm0 0v-3.675A55.378 55.378 0 0112 8.443m-7.007 11.55A5.981 5.981 0 006.75 15.75v-1.5"></path></svg>
              Functions`,i(T,"class","flex items-center gap-x-3 py-2 px-3 text-sm text-slate-700 rounded-md hover:bg-gray-100 dark:hover:bg-gray-900 dark:text-slate-400 dark:hover:text-slate-300 border border-gray-200 dark:border-gray-700 w-full")},m(R,A){W(R,e,A),l(e,T),t||(r=ae(T,"click",CT),t=!0)},d(R){R&&Y(e),t=!1,r()}}}function $T(E){let e,T,t,r;return{c(){e=P("li"),T=P("button"),T.innerHTML=`<svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M4.26 10.147a60.436 60.436 0 00-.491 6.347A48.627 48.627 0 0112 20.904a48.627 48.627 0 018.232-4.41 60.46 60.46 0 00-.491-6.347m-15.482 0a50.57 50.57 0 00-2.658-.813A59.905 59.905 0 0112 3.493a59.902 59.902 0 0110.399 5.84c-.896.248-1.783.52-2.658.814m-15.482 0A50.697 50.697 0 0112 13.489a50.702 50.702 0 017.74-3.342M6.75 15a.75.75 0 100-1.5.75.75 0 000 1.5zm0 0v-3.675A55.378 55.378 0 0112 8.443m-7.007 11.55A5.981 5.981 0 006.75 15.75v-1.5"></path></svg>
              Training Data`,i(T,"class","flex items-center gap-x-3 py-2 px-3 text-sm text-slate-700 rounded-md hover:bg-gray-100 dark:hover:bg-gray-900 dark:text-slate-400 dark:hover:text-slate-300 border border-gray-200 dark:border-gray-700 w-full")},m(R,A){W(R,e,A),l(e,T),t||(r=ae(T,"click",pR),t=!0)},d(R){R&&Y(e),t=!1,r()}}}function XT(E){let e,T,t,r,R,A=E[3].question+"",s,o,n,S;function O(){return E[2](E[3])}return{c(){e=P("li"),T=P("button"),t=OE("svg"),r=OE("path"),R=x(),s=Re(A),o=x(),i(r,"stroke-linecap","round"),i(r,"stroke-linejoin","round"),i(r,"d","M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 01.865-.501 48.172 48.172 0 003.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z"),i(t,"class","w-3.5 h-3.5"),i(t,"fill","none"),i(t,"stroke","currentColor"),i(t,"stroke-width","1.5"),i(t,"viewBox","0 0 24 24"),i(t,"xmlns","http://www.w3.org/2000/svg"),i(t,"aria-hidden","true"),i(T,"class","flex items-center text-left gap-x-3 py-2 px-3 text-sm text-slate-700 rounded-md hover:bg-gray-100 dark:hover:bg-gray-900 dark:text-slate-400 dark:hover:text-slate-300")},m(N,u){W(N,e,u),l(e,T),l(T,t),l(t,r),l(T,R),l(T,s),l(e,o),n||(S=ae(T,"click",O),n=!0)},p(N,u){E=N,u&2&&A!==(A=E[3].question+"")&&Pe(s,A)},d(N){N&&Y(e),n=!1,S()}}}function wn(E){let e,T,t,r,R,A,s,o,n,S,O,N,u,D,d,C,_,L,c,H=E[0].function_generation&&xT(),y=E[0].show_training_data&&$T(),h=ce(E[1]),a=[];for(let I=0;I<h.length;I+=1)a[I]=XT(wT(E,h,I));return{c(){e=P("div"),T=P("nav"),t=P("div"),r=P("img"),A=x(),s=P("div"),s.innerHTML='<button type="button" class="w-8 h-8 inline-flex justify-center items-center gap-2 rounded-md text-gray-700 align-middle focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 transition-all dark:text-gray-400 dark:focus:ring-offset-gray-800" data-hs-overlay="#application-sidebar" aria-controls="application-sidebar" aria-label="Toggle navigation"><svg class="w-4 h-4" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z"></path></svg> <span class="sr-only">Sidebar</span></button>',o=x(),n=P("div"),S=P("ul"),H&&H.c(),O=x(),y&&y.c(),N=x(),u=P("li"),D=P("button"),D.innerHTML=`<svg class="w-3.5 h-3.5" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M8 2C8.47339 2 8.85714 2.38376 8.85714 2.85714V7.14286L13.1429 7.14286C13.6162 7.14286 14 7.52661 14 8C14 8.47339 13.6162 8.85714 13.1429 8.85714L8.85714 8.85715V13.1429C8.85714 13.6162 8.47339 14 8 14C7.52661 14 7.14286 13.6162 7.14286 13.1429V8.85715L2.85714 8.85715C2.38376 8.85715 2 8.4734 2 8.00001C2 7.52662 2.38376 7.14287 2.85714 7.14287L7.14286 7.14286V2.85714C7.14286 2.38376 7.52661 2 8 2Z" fill="currentColor"></path></svg>
              New question`,d=x();for(let I=0;I<a.length;I+=1)a[I].c();C=x(),_=P("div"),_.innerHTML=`<div class="py-2.5 px-7"><p class="inline-flex items-center gap-x-2 text-xs text-green-600"><span class="block w-1.5 h-1.5 rounded-full bg-green-600"></span>
            Connected</p></div> <div class="p-4 border-t border-gray-200 dark:border-gray-700"><a class="flex justify-between items-center gap-x-3 py-2 px-3 text-sm text-slate-700 rounded-md hover:bg-gray-100 dark:hover:bg-gray-900 dark:text-slate-400 dark:hover:text-slate-300" href="/auth/logout">Sign out
            <svg class="w-3.5 h-3.5" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M10 3.5a.5.5 0 0 0-.5-.5h-8a.5.5 0 0 0-.5.5v9a.5.5 0 0 0 .5.5h8a.5.5 0 0 0 .5-.5v-2a.5.5 0 0 1 1 0v2A1.5 1.5 0 0 1 9.5 14h-8A1.5 1.5 0 0 1 0 12.5v-9A1.5 1.5 0 0 1 1.5 2h8A1.5 1.5 0 0 1 11 3.5v2a.5.5 0 0 1-1 0v-2z"></path><path fill-rule="evenodd" d="M4.146 8.354a.5.5 0 0 1 0-.708l3-3a.5.5 0 1 1 .708.708L5.707 7.5H14.5a.5.5 0 0 1 0 1H5.707l2.147 2.146a.5.5 0 0 1-.708.708l-3-3z"></path></svg></a></div>`,i(r,"class","w-28 h-auto"),YT(r.src,R=E[0].logo)||i(r,"src",R),i(r,"alt","Vanna Logo"),i(s,"class","lg:hidden"),i(t,"class","flex items-center justify-between py-4 pr-4 pl-7"),i(D,"class","w-full py-2 px-4 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none"),i(S,"class","space-y-1.5 p-4"),i(n,"class","h-full"),i(_,"class","mt-auto"),i(T,"class","hs-accordion-group w-full h-full flex flex-col"),i(T,"data-hs-accordion-always-open",""),i(e,"id","application-sidebar"),i(e,"class","hs-overlay hs-overlay-open:translate-x-0 -translate-x-full transition-all duration-300 transform hidden fixed top-0 left-0 bottom-0 z-[60] w-64 bg-white border-r border-gray-200 overflow-y-auto scrollbar-y lg:block lg:translate-x-0 lg:right-auto lg:bottom-0 dark:scrollbar-y dark:bg-slate-900 dark:border-gray-700")},m(I,f){W(I,e,f),l(e,T),l(T,t),l(t,r),l(t,A),l(t,s),l(T,o),l(T,n),l(n,S),H&&H.m(S,null),l(S,O),y&&y.m(S,null),l(S,N),l(S,u),l(u,D),l(S,d);for(let m=0;m<a.length;m+=1)a[m]&&a[m].m(S,null);l(T,C),l(T,_),L||(c=ae(D,"click",uT),L=!0)},p(I,[f]){if(f&1&&!YT(r.src,R=I[0].logo)&&i(r,"src",R),I[0].function_generation?H||(H=xT(),H.c(),H.m(S,O)):H&&(H.d(1),H=null),I[0].show_training_data?y||(y=$T(),y.c(),y.m(S,N)):y&&(y.d(1),y=null),f&2){h=ce(I[1]);let m;for(m=0;m<h.length;m+=1){const U=wT(I,h,m);a[m]?a[m].p(U,f):(a[m]=XT(U),a[m].c(),a[m].m(S,null))}for(;m<a.length;m+=1)a[m].d(1);a.length=h.length}},i:Z,o:Z,d(I){I&&Y(e),H&&H.d(),y&&y.d(),nE(a,I),L=!1,c()}}}function xn(E,e,T){let t,r;return RE(E,FE,A=>T(0,t=A)),RE(E,_T,A=>T(1,r=A)),[t,r,A=>{dn(A.id)}]}class $n extends Le{constructor(e){super(),_e(this,e,xn,wn,Ne,{})}}var Xn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function kn(E){return E&&E.__esModule&&Object.prototype.hasOwnProperty.call(E,"default")?E.default:E}var Kn={exports:{}};/*! For license information please see preline.js.LICENSE.txt */(function(E,e){(function(T,t){E.exports=t()})(self,function(){return(()=>{var T={661:(A,s,o)=>{function n(d){return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},n(d)}function S(d,C){for(var _=0;_<C.length;_++){var L=C[_];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(d,L.key,L)}}function O(d,C){return O=Object.setPrototypeOf||function(_,L){return _.__proto__=L,_},O(d,C)}function N(d,C){if(C&&(n(C)==="object"||typeof C=="function"))return C;if(C!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(d)}function u(d){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(C){return C.__proto__||Object.getPrototypeOf(C)},u(d)}var D=function(d){(function(h,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");h.prototype=Object.create(a&&a.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),Object.defineProperty(h,"prototype",{writable:!1}),a&&O(h,a)})(y,d);var C,_,L,c,H=(L=y,c=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var h,a=u(L);if(c){var I=u(this).constructor;h=Reflect.construct(a,arguments,I)}else h=a.apply(this,arguments);return N(this,h)});function y(){return function(h,a){if(!(h instanceof a))throw new TypeError("Cannot call a class as a function")}(this,y),H.call(this,".hs-accordion")}return C=y,(_=[{key:"init",value:function(){var h=this;document.addEventListener("click",function(a){var I=a.target,f=I.closest(h.selector),m=I.closest(".hs-accordion-toggle"),U=I.closest(".hs-accordion-group");f&&U&&m&&(h._hideAll(f),h.show(f))})}},{key:"show",value:function(h){var a=this;if(h.classList.contains("active"))return this.hide(h);h.classList.add("active");var I=h.querySelector(".hs-accordion-content");I.style.display="block",I.style.height=0,setTimeout(function(){I.style.height="".concat(I.scrollHeight,"px")}),this.afterTransition(I,function(){h.classList.contains("active")&&(I.style.height="",a._fireEvent("open",h),a._dispatch("open.hs.accordion",h,h))})}},{key:"hide",value:function(h){var a=this,I=h.querySelector(".hs-accordion-content");I.style.height="".concat(I.scrollHeight,"px"),setTimeout(function(){I.style.height=0}),this.afterTransition(I,function(){h.classList.contains("active")||(I.style.display="",a._fireEvent("hide",h),a._dispatch("hide.hs.accordion",h,h))}),h.classList.remove("active")}},{key:"_hideAll",value:function(h){var a=this,I=h.closest(".hs-accordion-group");I.hasAttribute("data-hs-accordion-always-open")||I.querySelectorAll(this.selector).forEach(function(f){h!==f&&a.hide(f)})}}])&&S(C.prototype,_),Object.defineProperty(C,"prototype",{writable:!1}),y}(o(765).Z);window.HSAccordion=new D,document.addEventListener("load",window.HSAccordion.init())},795:(A,s,o)=>{function n(C){return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},n(C)}function S(C,_){(_==null||_>C.length)&&(_=C.length);for(var L=0,c=new Array(_);L<_;L++)c[L]=C[L];return c}function O(C,_){for(var L=0;L<_.length;L++){var c=_[L];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(C,c.key,c)}}function N(C,_){return N=Object.setPrototypeOf||function(L,c){return L.__proto__=c,L},N(C,_)}function u(C,_){if(_&&(n(_)==="object"||typeof _=="function"))return _;if(_!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(L){if(L===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L}(C)}function D(C){return D=Object.setPrototypeOf?Object.getPrototypeOf:function(_){return _.__proto__||Object.getPrototypeOf(_)},D(C)}var d=function(C){(function(a,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(I&&I.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),I&&N(a,I)})(h,C);var _,L,c,H,y=(c=h,H=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var a,I=D(c);if(H){var f=D(this).constructor;a=Reflect.construct(I,arguments,f)}else a=I.apply(this,arguments);return u(this,a)});function h(){return function(a,I){if(!(a instanceof I))throw new TypeError("Cannot call a class as a function")}(this,h),y.call(this,"[data-hs-collapse]")}return _=h,(L=[{key:"init",value:function(){var a=this;document.addEventListener("click",function(I){var f=I.target.closest(a.selector);if(f){var m=document.querySelectorAll(f.getAttribute("data-hs-collapse"));a.toggle(m)}})}},{key:"toggle",value:function(a){var I,f=this;a.length&&(I=a,function(m){if(Array.isArray(m))return S(m)}(I)||function(m){if(typeof Symbol<"u"&&m[Symbol.iterator]!=null||m["@@iterator"]!=null)return Array.from(m)}(I)||function(m,U){if(m){if(typeof m=="string")return S(m,U);var g=Object.prototype.toString.call(m).slice(8,-1);return g==="Object"&&m.constructor&&(g=m.constructor.name),g==="Map"||g==="Set"?Array.from(m):g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g)?S(m,U):void 0}}(I)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()).forEach(function(m){m.classList.contains("hidden")?f.show(m):f.hide(m)})}},{key:"show",value:function(a){var I=this;a.classList.add("open"),a.classList.remove("hidden"),a.style.height=0,document.querySelectorAll(this.selector).forEach(function(f){a.closest(f.getAttribute("data-hs-collapse"))&&f.classList.add("open")}),a.style.height="".concat(a.scrollHeight,"px"),this.afterTransition(a,function(){a.classList.contains("open")&&(a.style.height="",I._fireEvent("open",a),I._dispatch("open.hs.collapse",a,a))})}},{key:"hide",value:function(a){var I=this;a.style.height="".concat(a.scrollHeight,"px"),setTimeout(function(){a.style.height=0}),a.classList.remove("open"),this.afterTransition(a,function(){a.classList.contains("open")||(a.classList.add("hidden"),a.style.height=null,I._fireEvent("hide",a),I._dispatch("hide.hs.collapse",a,a),a.querySelectorAll(".hs-mega-menu-content.block").forEach(function(f){f.classList.remove("block"),f.classList.add("hidden")}))}),document.querySelectorAll(this.selector).forEach(function(f){a.closest(f.getAttribute("data-hs-collapse"))&&f.classList.remove("open")})}}])&&O(_.prototype,L),Object.defineProperty(_,"prototype",{writable:!1}),h}(o(765).Z);window.HSCollapse=new d,document.addEventListener("load",window.HSCollapse.init())},682:(A,s,o)=>{var n=o(714),S=o(765);const O={historyIndex:-1,addHistory:function(H){this.historyIndex=H},existsInHistory:function(H){return H>this.historyIndex},clearHistory:function(){this.historyIndex=-1}};function N(H){return N=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},N(H)}function u(H){return function(y){if(Array.isArray(y))return D(y)}(H)||function(y){if(typeof Symbol<"u"&&y[Symbol.iterator]!=null||y["@@iterator"]!=null)return Array.from(y)}(H)||function(y,h){if(y){if(typeof y=="string")return D(y,h);var a=Object.prototype.toString.call(y).slice(8,-1);return a==="Object"&&y.constructor&&(a=y.constructor.name),a==="Map"||a==="Set"?Array.from(y):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?D(y,h):void 0}}(H)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function D(H,y){(y==null||y>H.length)&&(y=H.length);for(var h=0,a=new Array(y);h<y;h++)a[h]=H[h];return a}function d(H,y){for(var h=0;h<y.length;h++){var a=y[h];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(H,a.key,a)}}function C(H,y){return C=Object.setPrototypeOf||function(h,a){return h.__proto__=a,h},C(H,y)}function _(H,y){if(y&&(N(y)==="object"||typeof y=="function"))return y;if(y!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}(H)}function L(H){return L=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)},L(H)}var c=function(H){(function(U,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function");U.prototype=Object.create(g&&g.prototype,{constructor:{value:U,writable:!0,configurable:!0}}),Object.defineProperty(U,"prototype",{writable:!1}),g&&C(U,g)})(m,H);var y,h,a,I,f=(a=m,I=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var U,g=L(a);if(I){var F=L(this).constructor;U=Reflect.construct(g,arguments,F)}else U=g.apply(this,arguments);return _(this,U)});function m(){var U;return function(g,F){if(!(g instanceof F))throw new TypeError("Cannot call a class as a function")}(this,m),(U=f.call(this,".hs-dropdown")).positions={top:"top","top-left":"top-start","top-right":"top-end",bottom:"bottom","bottom-left":"bottom-start","bottom-right":"bottom-end",right:"right","right-top":"right-start","right-bottom":"right-end",left:"left","left-top":"left-start","left-bottom":"left-end"},U.absoluteStrategyModifiers=function(g){return[{name:"applyStyles",fn:function(F){var w=(window.getComputedStyle(g).getPropertyValue("--strategy")||"absolute").replace(" ",""),K=(window.getComputedStyle(g).getPropertyValue("--adaptive")||"adaptive").replace(" ","");F.state.elements.popper.style.position=w,F.state.elements.popper.style.transform=K==="adaptive"?F.state.styles.popper.transform:null,F.state.elements.popper.style.top=null,F.state.elements.popper.style.bottom=null,F.state.elements.popper.style.left=null,F.state.elements.popper.style.right=null,F.state.elements.popper.style.margin=0}},{name:"computeStyles",options:{adaptive:!1}}]},U._history=O,U}return y=m,h=[{key:"init",value:function(){var U=this;document.addEventListener("click",function(g){var F=g.target,w=F.closest(U.selector),K=F.closest(".hs-dropdown-menu");if(w&&w.classList.contains("open")||U._closeOthers(w),K){var j=(window.getComputedStyle(w).getPropertyValue("--auto-close")||"").replace(" ","");if((j=="false"||j=="inside")&&!w.parentElement.closest(U.selector))return}w&&(w.classList.contains("open")?U.close(w):U.open(w))}),document.addEventListener("mousemove",function(g){var F=g.target,w=F.closest(U.selector);if(F.closest(".hs-dropdown-menu"),w){var K=(window.getComputedStyle(w).getPropertyValue("--trigger")||"click").replace(" ","");if(K!=="hover")return;w&&w.classList.contains("open")||U._closeOthers(w),K!=="hover"||w.classList.contains("open")||/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)||U._hover(F)}}),document.addEventListener("keydown",this._keyboardSupport.bind(this)),window.addEventListener("resize",function(){document.querySelectorAll(".hs-dropdown.open").forEach(function(g){U.close(g,!0)})})}},{key:"_closeOthers",value:function(){var U=this,g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,F=document.querySelectorAll("".concat(this.selector,".open"));F.forEach(function(w){if(!g||g.closest(".hs-dropdown.open")!==w){var K=(window.getComputedStyle(w).getPropertyValue("--auto-close")||"").replace(" ","");K!="false"&&K!="outside"&&U.close(w)}})}},{key:"_hover",value:function(U){var g=this,F=U.closest(this.selector);this.open(F),document.addEventListener("mousemove",function w(K){K.target.closest(g.selector)&&K.target.closest(g.selector)!==F.parentElement.closest(g.selector)||(g.close(F),document.removeEventListener("mousemove",w,!0))},!0)}},{key:"close",value:function(U){var g=this,F=arguments.length>1&&arguments[1]!==void 0&&arguments[1],w=U.querySelector(".hs-dropdown-menu"),K=function(){U.classList.contains("open")||(w.classList.remove("block"),w.classList.add("hidden"),w.style.inset=null,w.style.position=null,U._popper&&U._popper.destroy())};F||this.afterTransition(U.querySelector("[data-hs-dropdown-transition]")||w,function(){K()}),w.style.margin=null,U.classList.remove("open"),F&&K(),this._fireEvent("close",U),this._dispatch("close.hs.dropdown",U,U);var j=w.querySelectorAll(".hs-dropdown.open");j.forEach(function(pe){g.close(pe,!0)})}},{key:"open",value:function(U){var g=U.querySelector(".hs-dropdown-menu"),F=(window.getComputedStyle(U).getPropertyValue("--placement")||"").replace(" ",""),w=(window.getComputedStyle(U).getPropertyValue("--strategy")||"fixed").replace(" ",""),K=((window.getComputedStyle(U).getPropertyValue("--adaptive")||"adaptive").replace(" ",""),parseInt((window.getComputedStyle(U).getPropertyValue("--offset")||"10").replace(" ","")));if(w!=="static"){U._popper&&U._popper.destroy();var j=(0,n.fi)(U,g,{placement:this.positions[F]||"bottom-start",strategy:w,modifiers:[].concat(u(w!=="fixed"?this.absoluteStrategyModifiers(U):[]),[{name:"offset",options:{offset:[0,K]}}])});U._popper=j}g.style.margin=null,g.classList.add("block"),g.classList.remove("hidden"),setTimeout(function(){U.classList.add("open")}),this._fireEvent("open",U),this._dispatch("open.hs.dropdown",U,U)}},{key:"_keyboardSupport",value:function(U){var g=document.querySelector(".hs-dropdown.open");if(g)return U.keyCode===27?(U.preventDefault(),this._esc(g)):U.keyCode===40?(U.preventDefault(),this._down(g)):U.keyCode===38?(U.preventDefault(),this._up(g)):U.keyCode===36?(U.preventDefault(),this._start(g)):U.keyCode===35?(U.preventDefault(),this._end(g)):void this._byChar(g,U.key)}},{key:"_esc",value:function(U){this.close(U)}},{key:"_up",value:function(U){var g=U.querySelector(".hs-dropdown-menu"),F=u(g.querySelectorAll("a")).reverse().filter(function(j){return!j.disabled}),w=g.querySelector("a:focus"),K=F.findIndex(function(j){return j===w});K+1<F.length&&K++,F[K].focus()}},{key:"_down",value:function(U){var g=U.querySelector(".hs-dropdown-menu"),F=u(g.querySelectorAll("a")).filter(function(j){return!j.disabled}),w=g.querySelector("a:focus"),K=F.findIndex(function(j){return j===w});K+1<F.length&&K++,F[K].focus()}},{key:"_start",value:function(U){var g=u(U.querySelector(".hs-dropdown-menu").querySelectorAll("a")).filter(function(F){return!F.disabled});g.length&&g[0].focus()}},{key:"_end",value:function(U){var g=u(U.querySelector(".hs-dropdown-menu").querySelectorAll("a")).reverse().filter(function(F){return!F.disabled});g.length&&g[0].focus()}},{key:"_byChar",value:function(U,g){var F=this,w=u(U.querySelector(".hs-dropdown-menu").querySelectorAll("a")),K=function(){return w.findIndex(function(pe,se){return pe.innerText.toLowerCase().charAt(0)===g.toLowerCase()&&F._history.existsInHistory(se)})},j=K();j===-1&&(this._history.clearHistory(),j=K()),j!==-1&&(w[j].focus(),this._history.addHistory(j))}},{key:"toggle",value:function(U){U.classList.contains("open")?this.close(U):this.open(U)}}],h&&d(y.prototype,h),Object.defineProperty(y,"prototype",{writable:!1}),m}(S.Z);window.HSDropdown=new c,document.addEventListener("load",window.HSDropdown.init())},284:(A,s,o)=>{function n(C){return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},n(C)}function S(C,_){(_==null||_>C.length)&&(_=C.length);for(var L=0,c=new Array(_);L<_;L++)c[L]=C[L];return c}function O(C,_){for(var L=0;L<_.length;L++){var c=_[L];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(C,c.key,c)}}function N(C,_){return N=Object.setPrototypeOf||function(L,c){return L.__proto__=c,L},N(C,_)}function u(C,_){if(_&&(n(_)==="object"||typeof _=="function"))return _;if(_!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(L){if(L===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L}(C)}function D(C){return D=Object.setPrototypeOf?Object.getPrototypeOf:function(_){return _.__proto__||Object.getPrototypeOf(_)},D(C)}var d=function(C){(function(a,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(I&&I.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),I&&N(a,I)})(h,C);var _,L,c,H,y=(c=h,H=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var a,I=D(c);if(H){var f=D(this).constructor;a=Reflect.construct(I,arguments,f)}else a=I.apply(this,arguments);return u(this,a)});function h(){var a;return function(I,f){if(!(I instanceof f))throw new TypeError("Cannot call a class as a function")}(this,h),(a=y.call(this,"[data-hs-overlay]")).openNextOverlay=!1,a}return _=h,(L=[{key:"init",value:function(){var a=this;document.addEventListener("click",function(I){var f=I.target.closest(a.selector),m=I.target.closest("[data-hs-overlay-close]"),U=I.target.getAttribute("aria-overlay")==="true";return m?a.close(m.closest(".hs-overlay.open")):f?a.toggle(document.querySelector(f.getAttribute("data-hs-overlay"))):void(U&&a._onBackdropClick(I.target))}),document.addEventListener("keydown",function(I){if(I.keyCode===27){var f=document.querySelector(".hs-overlay.open");if(!f)return;setTimeout(function(){f.getAttribute("data-hs-overlay-keyboard")!=="false"&&a.close(f)})}})}},{key:"toggle",value:function(a){a&&(a.classList.contains("hidden")?this.open(a):this.close(a))}},{key:"open",value:function(a){var I=this;if(a){var f=document.querySelector(".hs-overlay.open"),m=this.getClassProperty(a,"--body-scroll","false")!=="true";if(f)return this.openNextOverlay=!0,this.close(f).then(function(){I.open(a),I.openNextOverlay=!1});m&&(document.body.style.overflow="hidden"),this._buildBackdrop(a),this._checkTimer(a),this._autoHide(a),a.classList.remove("hidden"),a.setAttribute("aria-overlay","true"),a.setAttribute("tabindex","-1"),setTimeout(function(){a.classList.contains("hidden")||(a.classList.add("open"),I._fireEvent("open",a),I._dispatch("open.hs.overlay",a,a),I._focusInput(a))},50)}}},{key:"close",value:function(a){var I=this;return new Promise(function(f){a&&(a.classList.remove("open"),a.removeAttribute("aria-overlay"),a.removeAttribute("tabindex","-1"),I.afterTransition(a,function(){a.classList.contains("open")||(a.classList.add("hidden"),I._destroyBackdrop(),I._fireEvent("close",a),I._dispatch("close.hs.overlay",a,a),document.body.style.overflow="",f(a))}))})}},{key:"_autoHide",value:function(a){var I=this,f=parseInt(this.getClassProperty(a,"--auto-hide","0"));f&&(a.autoHide=setTimeout(function(){I.close(a)},f))}},{key:"_checkTimer",value:function(a){a.autoHide&&(clearTimeout(a.autoHide),delete a.autoHide)}},{key:"_onBackdropClick",value:function(a){this.getClassProperty(a,"--overlay-backdrop","true")!=="static"&&this.close(a)}},{key:"_buildBackdrop",value:function(a){var I,f=this,m=a.getAttribute("data-hs-overlay-backdrop-container")||!1,U=document.createElement("div"),g="transition duration fixed inset-0 z-50 bg-gray-900 bg-opacity-50 dark:bg-opacity-80 hs-overlay-backdrop",F=function(j,pe){var se=typeof Symbol<"u"&&j[Symbol.iterator]||j["@@iterator"];if(!se){if(Array.isArray(j)||(se=function(me,fE){if(me){if(typeof me=="string")return S(me,fE);var TE=Object.prototype.toString.call(me).slice(8,-1);return TE==="Object"&&me.constructor&&(TE=me.constructor.name),TE==="Map"||TE==="Set"?Array.from(me):TE==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(TE)?S(me,fE):void 0}}(j))||pe&&j&&typeof j.length=="number"){se&&(j=se);var le=0,Ue=function(){};return{s:Ue,n:function(){return le>=j.length?{done:!0}:{done:!1,value:j[le++]}},e:function(me){throw me},f:Ue}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ye,tE=!0,dE=!1;return{s:function(){se=se.call(j)},n:function(){var me=se.next();return tE=me.done,me},e:function(me){dE=!0,ye=me},f:function(){try{tE||se.return==null||se.return()}finally{if(dE)throw ye}}}}(a.classList.values());try{for(F.s();!(I=F.n()).done;){var w=I.value;w.startsWith("hs-overlay-backdrop-open:")&&(g+=" ".concat(w))}}catch(j){F.e(j)}finally{F.f()}var K=this.getClassProperty(a,"--overlay-backdrop","true")!=="static";this.getClassProperty(a,"--overlay-backdrop","true")==="false"||(m&&((U=document.querySelector(m).cloneNode(!0)).classList.remove("hidden"),g=U.classList,U.classList=""),K&&U.addEventListener("click",function(){return f.close(a)},!0),U.setAttribute("data-hs-overlay-backdrop-template",""),document.body.appendChild(U),setTimeout(function(){U.classList=g}))}},{key:"_destroyBackdrop",value:function(){var a=document.querySelector("[data-hs-overlay-backdrop-template]");a&&(this.openNextOverlay&&(a.style.transitionDuration="".concat(1.8*parseFloat(window.getComputedStyle(a).transitionDuration.replace(/[^\\d.-]/g,"")),"s")),a.classList.add("opacity-0"),this.afterTransition(a,function(){a.remove()}))}},{key:"_focusInput",value:function(a){var I=a.querySelector("[autofocus]");I&&I.focus()}}])&&O(_.prototype,L),Object.defineProperty(_,"prototype",{writable:!1}),h}(o(765).Z);window.HSOverlay=new d,document.addEventListener("load",window.HSOverlay.init())},181:(A,s,o)=>{function n(d){return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},n(d)}function S(d,C){for(var _=0;_<C.length;_++){var L=C[_];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(d,L.key,L)}}function O(d,C){return O=Object.setPrototypeOf||function(_,L){return _.__proto__=L,_},O(d,C)}function N(d,C){if(C&&(n(C)==="object"||typeof C=="function"))return C;if(C!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(d)}function u(d){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(C){return C.__proto__||Object.getPrototypeOf(C)},u(d)}var D=function(d){(function(h,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");h.prototype=Object.create(a&&a.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),Object.defineProperty(h,"prototype",{writable:!1}),a&&O(h,a)})(y,d);var C,_,L,c,H=(L=y,c=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var h,a=u(L);if(c){var I=u(this).constructor;h=Reflect.construct(a,arguments,I)}else h=a.apply(this,arguments);return N(this,h)});function y(){return function(h,a){if(!(h instanceof a))throw new TypeError("Cannot call a class as a function")}(this,y),H.call(this,"[data-hs-remove-element]")}return C=y,(_=[{key:"init",value:function(){var h=this;document.addEventListener("click",function(a){var I=a.target.closest(h.selector);if(I){var f=document.querySelector(I.getAttribute("data-hs-remove-element"));f&&(f.classList.add("hs-removing"),h.afterTransition(f,function(){f.remove()}))}})}}])&&S(C.prototype,_),Object.defineProperty(C,"prototype",{writable:!1}),y}(o(765).Z);window.HSRemoveElement=new D,document.addEventListener("load",window.HSRemoveElement.init())},778:(A,s,o)=>{function n(d){return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},n(d)}function S(d,C){for(var _=0;_<C.length;_++){var L=C[_];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(d,L.key,L)}}function O(d,C){return O=Object.setPrototypeOf||function(_,L){return _.__proto__=L,_},O(d,C)}function N(d,C){if(C&&(n(C)==="object"||typeof C=="function"))return C;if(C!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(d)}function u(d){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(C){return C.__proto__||Object.getPrototypeOf(C)},u(d)}var D=function(d){(function(h,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");h.prototype=Object.create(a&&a.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),Object.defineProperty(h,"prototype",{writable:!1}),a&&O(h,a)})(y,d);var C,_,L,c,H=(L=y,c=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var h,a=u(L);if(c){var I=u(this).constructor;h=Reflect.construct(a,arguments,I)}else h=a.apply(this,arguments);return N(this,h)});function y(){var h;return function(a,I){if(!(a instanceof I))throw new TypeError("Cannot call a class as a function")}(this,y),(h=H.call(this,"[data-hs-scrollspy] ")).activeSection=null,h}return C=y,(_=[{key:"init",value:function(){var h=this;document.querySelectorAll(this.selector).forEach(function(a){var I=document.querySelector(a.getAttribute("data-hs-scrollspy")),f=a.querySelectorAll("[href]"),m=I.children,U=a.getAttribute("data-hs-scrollspy-scrollable-parent")?document.querySelector(a.getAttribute("data-hs-scrollspy-scrollable-parent")):document;Array.from(m).forEach(function(g){g.getAttribute("id")&&U.addEventListener("scroll",function(F){return h._update({$scrollspyEl:a,$scrollspyContentEl:I,links:f,$sectionEl:g,sections:m,ev:F})})}),f.forEach(function(g){g.addEventListener("click",function(F){F.preventDefault(),g.getAttribute("href")!=="javascript:;"&&h._scrollTo({$scrollspyEl:a,$scrollableEl:U,$link:g})})})})}},{key:"_update",value:function(h){var a=h.ev,I=h.$scrollspyEl,f=(h.sections,h.links),m=h.$sectionEl,U=parseInt(this.getClassProperty(I,"--scrollspy-offset","0")),g=this.getClassProperty(m,"--scrollspy-offset")||U,F=a.target===document?0:parseInt(a.target.getBoundingClientRect().top),w=parseInt(m.getBoundingClientRect().top)-g-F,K=m.offsetHeight;if(w<=0&&w+K>0){if(this.activeSection===m)return;f.forEach(function(le){le.classList.remove("active")});var j=I.querySelector('[href="#'.concat(m.getAttribute("id"),'"]'));if(j){j.classList.add("active");var pe=j.closest("[data-hs-scrollspy-group]");if(pe){var se=pe.querySelector("[href]");se&&se.classList.add("active")}}this.activeSection=m}}},{key:"_scrollTo",value:function(h){var a=h.$scrollspyEl,I=h.$scrollableEl,f=h.$link,m=document.querySelector(f.getAttribute("href")),U=parseInt(this.getClassProperty(a,"--scrollspy-offset","0")),g=this.getClassProperty(m,"--scrollspy-offset")||U,F=I===document?0:I.offsetTop,w=m.offsetTop-g-F,K=I===document?window:I;this._fireEvent("scroll",a),this._dispatch("scroll.hs.scrollspy",a,a),window.history.replaceState(null,null,f.getAttribute("href")),K.scrollTo({top:w,left:0,behavior:"smooth"})}}])&&S(C.prototype,_),Object.defineProperty(C,"prototype",{writable:!1}),y}(o(765).Z);window.HSScrollspy=new D,document.addEventListener("load",window.HSScrollspy.init())},51:(A,s,o)=>{function n(_){return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(L){return typeof L}:function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L},n(_)}function S(_){return function(L){if(Array.isArray(L))return O(L)}(_)||function(L){if(typeof Symbol<"u"&&L[Symbol.iterator]!=null||L["@@iterator"]!=null)return Array.from(L)}(_)||function(L,c){if(L){if(typeof L=="string")return O(L,c);var H=Object.prototype.toString.call(L).slice(8,-1);return H==="Object"&&L.constructor&&(H=L.constructor.name),H==="Map"||H==="Set"?Array.from(L):H==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(H)?O(L,c):void 0}}(_)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function O(_,L){(L==null||L>_.length)&&(L=_.length);for(var c=0,H=new Array(L);c<L;c++)H[c]=_[c];return H}function N(_,L){for(var c=0;c<L.length;c++){var H=L[c];H.enumerable=H.enumerable||!1,H.configurable=!0,"value"in H&&(H.writable=!0),Object.defineProperty(_,H.key,H)}}function u(_,L){return u=Object.setPrototypeOf||function(c,H){return c.__proto__=H,c},u(_,L)}function D(_,L){if(L&&(n(L)==="object"||typeof L=="function"))return L;if(L!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}(_)}function d(_){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(L){return L.__proto__||Object.getPrototypeOf(L)},d(_)}var C=function(_){(function(I,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");I.prototype=Object.create(f&&f.prototype,{constructor:{value:I,writable:!0,configurable:!0}}),Object.defineProperty(I,"prototype",{writable:!1}),f&&u(I,f)})(a,_);var L,c,H,y,h=(H=a,y=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var I,f=d(H);if(y){var m=d(this).constructor;I=Reflect.construct(f,arguments,m)}else I=f.apply(this,arguments);return D(this,I)});function a(){return function(I,f){if(!(I instanceof f))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,"[data-hs-tab]")}return L=a,(c=[{key:"init",value:function(){var I=this;document.addEventListener("keydown",this._keyboardSupport.bind(this)),document.addEventListener("click",function(f){var m=f.target.closest(I.selector);m&&I.open(m)}),document.querySelectorAll("[hs-data-tab-select]").forEach(function(f){var m=document.querySelector(f.getAttribute("hs-data-tab-select"));m&&m.addEventListener("change",function(U){var g=document.querySelector('[data-hs-tab="'.concat(U.target.value,'"]'));g&&I.open(g)})})}},{key:"open",value:function(I){var f=document.querySelector(I.getAttribute("data-hs-tab")),m=S(I.parentElement.children),U=S(f.parentElement.children),g=I.closest("[hs-data-tab-select]"),F=g?document.querySelector(g.getAttribute("data-hs-tab")):null;m.forEach(function(w){return w.classList.remove("active")}),U.forEach(function(w){return w.classList.add("hidden")}),I.classList.add("active"),f.classList.remove("hidden"),this._fireEvent("change",I),this._dispatch("change.hs.tab",I,I),F&&(F.value=I.getAttribute("data-hs-tab"))}},{key:"_keyboardSupport",value:function(I){var f=I.target.closest(this.selector);if(f){var m=f.closest('[role="tablist"]').getAttribute("data-hs-tabs-vertical")==="true";return(m?I.keyCode===38:I.keyCode===37)?(I.preventDefault(),this._left(f)):(m?I.keyCode===40:I.keyCode===39)?(I.preventDefault(),this._right(f)):I.keyCode===36?(I.preventDefault(),this._start(f)):I.keyCode===35?(I.preventDefault(),this._end(f)):void 0}}},{key:"_right",value:function(I){var f=I.closest('[role="tablist"]');if(f){var m=S(f.querySelectorAll(this.selector)).filter(function(F){return!F.disabled}),U=f.querySelector("button:focus"),g=m.findIndex(function(F){return F===U});g+1<m.length?g++:g=0,m[g].focus(),this.open(m[g])}}},{key:"_left",value:function(I){var f=I.closest('[role="tablist"]');if(f){var m=S(f.querySelectorAll(this.selector)).filter(function(F){return!F.disabled}).reverse(),U=f.querySelector("button:focus"),g=m.findIndex(function(F){return F===U});g+1<m.length?g++:g=0,m[g].focus(),this.open(m[g])}}},{key:"_start",value:function(I){var f=I.closest('[role="tablist"]');if(f){var m=S(f.querySelectorAll(this.selector)).filter(function(U){return!U.disabled});m.length&&(m[0].focus(),this.open(m[0]))}}},{key:"_end",value:function(I){var f=I.closest('[role="tablist"]');if(f){var m=S(f.querySelectorAll(this.selector)).reverse().filter(function(U){return!U.disabled});m.length&&(m[0].focus(),this.open(m[0]))}}}])&&N(L.prototype,c),Object.defineProperty(L,"prototype",{writable:!1}),a}(o(765).Z);window.HSTabs=new C,document.addEventListener("load",window.HSTabs.init())},185:(A,s,o)=>{var n=o(765),S=o(714);function O(_){return O=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(L){return typeof L}:function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L},O(_)}function N(_,L){for(var c=0;c<L.length;c++){var H=L[c];H.enumerable=H.enumerable||!1,H.configurable=!0,"value"in H&&(H.writable=!0),Object.defineProperty(_,H.key,H)}}function u(_,L){return u=Object.setPrototypeOf||function(c,H){return c.__proto__=H,c},u(_,L)}function D(_,L){if(L&&(O(L)==="object"||typeof L=="function"))return L;if(L!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}(_)}function d(_){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(L){return L.__proto__||Object.getPrototypeOf(L)},d(_)}var C=function(_){(function(I,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");I.prototype=Object.create(f&&f.prototype,{constructor:{value:I,writable:!0,configurable:!0}}),Object.defineProperty(I,"prototype",{writable:!1}),f&&u(I,f)})(a,_);var L,c,H,y,h=(H=a,y=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var I,f=d(H);if(y){var m=d(this).constructor;I=Reflect.construct(f,arguments,m)}else I=f.apply(this,arguments);return D(this,I)});function a(){return function(I,f){if(!(I instanceof f))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,".hs-tooltip")}return L=a,(c=[{key:"init",value:function(){var I=this;document.addEventListener("click",function(f){var m=f.target.closest(I.selector);m&&I.getClassProperty(m,"--trigger")==="focus"&&I._focus(m),m&&I.getClassProperty(m,"--trigger")==="click"&&I._click(m)}),document.addEventListener("mousemove",function(f){var m=f.target.closest(I.selector);m&&I.getClassProperty(m,"--trigger")!=="focus"&&I.getClassProperty(m,"--trigger")!=="click"&&I._hover(m)})}},{key:"_hover",value:function(I){var f=this;if(!I.classList.contains("show")){var m=I.querySelector(".hs-tooltip-toggle"),U=I.querySelector(".hs-tooltip-content"),g=this.getClassProperty(I,"--placement");(0,S.fi)(m,U,{placement:g||"top",strategy:"fixed",modifiers:[{name:"offset",options:{offset:[0,5]}}]}),this.show(I),I.addEventListener("mouseleave",function F(w){w.relatedTarget.closest(f.selector)&&w.relatedTarget.closest(f.selector)==I||(f.hide(I),I.removeEventListener("mouseleave",F,!0))},!0)}}},{key:"_focus",value:function(I){var f=this,m=I.querySelector(".hs-tooltip-toggle"),U=I.querySelector(".hs-tooltip-content"),g=this.getClassProperty(I,"--placement"),F=this.getClassProperty(I,"--strategy");(0,S.fi)(m,U,{placement:g||"top",strategy:F||"fixed",modifiers:[{name:"offset",options:{offset:[0,5]}}]}),this.show(I),I.addEventListener("blur",function w(){f.hide(I),I.removeEventListener("blur",w,!0)},!0)}},{key:"_click",value:function(I){var f=this;if(!I.classList.contains("show")){var m=I.querySelector(".hs-tooltip-toggle"),U=I.querySelector(".hs-tooltip-content"),g=this.getClassProperty(I,"--placement"),F=this.getClassProperty(I,"--strategy");(0,S.fi)(m,U,{placement:g||"top",strategy:F||"fixed",modifiers:[{name:"offset",options:{offset:[0,5]}}]}),this.show(I);var w=function K(j){setTimeout(function(){f.hide(I),I.removeEventListener("click",K,!0),I.removeEventListener("blur",K,!0)})};I.addEventListener("blur",w,!0),I.addEventListener("click",w,!0)}}},{key:"show",value:function(I){var f=this;I.querySelector(".hs-tooltip-content").classList.remove("hidden"),setTimeout(function(){I.classList.add("show"),f._fireEvent("show",I),f._dispatch("show.hs.tooltip",I,I)})}},{key:"hide",value:function(I){var f=I.querySelector(".hs-tooltip-content");I.classList.remove("show"),this._fireEvent("hide",I),this._dispatch("hide.hs.tooltip",I,I),this.afterTransition(f,function(){I.classList.contains("show")||f.classList.add("hidden")})}}])&&N(L.prototype,c),Object.defineProperty(L,"prototype",{writable:!1}),a}(n.Z);window.HSTooltip=new C,document.addEventListener("load",window.HSTooltip.init())},765:(A,s,o)=>{function n(O,N){for(var u=0;u<N.length;u++){var D=N[u];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(O,D.key,D)}}o.d(s,{Z:()=>S});var S=function(){function O(D,d){(function(C,_){if(!(C instanceof _))throw new TypeError("Cannot call a class as a function")})(this,O),this.$collection=[],this.selector=D,this.config=d,this.events={}}var N,u;return N=O,u=[{key:"_fireEvent",value:function(D){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.events.hasOwnProperty(D)&&this.events[D](d)}},{key:"_dispatch",value:function(D,d){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,_=new CustomEvent(D,{detail:{payload:C},bubbles:!0,cancelable:!0,composed:!1});d.dispatchEvent(_)}},{key:"on",value:function(D,d){this.events[D]=d}},{key:"afterTransition",value:function(D,d){window.getComputedStyle(D,null).getPropertyValue("transition")!=="all 0s ease 0s"?D.addEventListener("transitionend",function C(){d(),D.removeEventListener("transitionend",C,!0)},!0):d()}},{key:"getClassProperty",value:function(D,d){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",_=(window.getComputedStyle(D).getPropertyValue(d)||C).replace(" ","");return _}}],u&&n(N.prototype,u),Object.defineProperty(N,"prototype",{writable:!1}),O}()},714:(A,s,o)=>{function n(M){if(M==null)return window;if(M.toString()!=="[object Window]"){var p=M.ownerDocument;return p&&p.defaultView||window}return M}function S(M){return M instanceof n(M).Element||M instanceof Element}function O(M){return M instanceof n(M).HTMLElement||M instanceof HTMLElement}function N(M){return typeof ShadowRoot<"u"&&(M instanceof n(M).ShadowRoot||M instanceof ShadowRoot)}o.d(s,{fi:()=>zR});var u=Math.max,D=Math.min,d=Math.round;function C(M,p){p===void 0&&(p=!1);var b=M.getBoundingClientRect(),V=1,Q=1;if(O(M)&&p){var J=M.offsetHeight,q=M.offsetWidth;q>0&&(V=d(b.width)/q||1),J>0&&(Q=d(b.height)/J||1)}return{width:b.width/V,height:b.height/Q,top:b.top/Q,right:b.right/V,bottom:b.bottom/Q,left:b.left/V,x:b.left/V,y:b.top/Q}}function _(M){var p=n(M);return{scrollLeft:p.pageXOffset,scrollTop:p.pageYOffset}}function L(M){return M?(M.nodeName||"").toLowerCase():null}function c(M){return((S(M)?M.ownerDocument:M.document)||window.document).documentElement}function H(M){return C(c(M)).left+_(M).scrollLeft}function y(M){return n(M).getComputedStyle(M)}function h(M){var p=y(M),b=p.overflow,V=p.overflowX,Q=p.overflowY;return/auto|scroll|overlay|hidden/.test(b+Q+V)}function a(M,p,b){b===void 0&&(b=!1);var V,Q,J=O(p),q=O(p)&&function(te){var We=te.getBoundingClientRect(),Oe=d(We.width)/te.offsetWidth||1,Me=d(We.height)/te.offsetHeight||1;return Oe!==1||Me!==1}(p),z=c(p),ee=C(M,q),re={scrollLeft:0,scrollTop:0},ne={x:0,y:0};return(J||!J&&!b)&&((L(p)!=="body"||h(z))&&(re=(V=p)!==n(V)&&O(V)?{scrollLeft:(Q=V).scrollLeft,scrollTop:Q.scrollTop}:_(V)),O(p)?((ne=C(p,!0)).x+=p.clientLeft,ne.y+=p.clientTop):z&&(ne.x=H(z))),{x:ee.left+re.scrollLeft-ne.x,y:ee.top+re.scrollTop-ne.y,width:ee.width,height:ee.height}}function I(M){var p=C(M),b=M.offsetWidth,V=M.offsetHeight;return Math.abs(p.width-b)<=1&&(b=p.width),Math.abs(p.height-V)<=1&&(V=p.height),{x:M.offsetLeft,y:M.offsetTop,width:b,height:V}}function f(M){return L(M)==="html"?M:M.assignedSlot||M.parentNode||(N(M)?M.host:null)||c(M)}function m(M){return["html","body","#document"].indexOf(L(M))>=0?M.ownerDocument.body:O(M)&&h(M)?M:m(f(M))}function U(M,p){var b;p===void 0&&(p=[]);var V=m(M),Q=V===((b=M.ownerDocument)==null?void 0:b.body),J=n(V),q=Q?[J].concat(J.visualViewport||[],h(V)?V:[]):V,z=p.concat(q);return Q?z:z.concat(U(f(q)))}function g(M){return["table","td","th"].indexOf(L(M))>=0}function F(M){return O(M)&&y(M).position!=="fixed"?M.offsetParent:null}function w(M){for(var p=n(M),b=F(M);b&&g(b)&&y(b).position==="static";)b=F(b);return b&&(L(b)==="html"||L(b)==="body"&&y(b).position==="static")?p:b||function(V){var Q=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1;if(navigator.userAgent.indexOf("Trident")!==-1&&O(V)&&y(V).position==="fixed")return null;for(var J=f(V);O(J)&&["html","body"].indexOf(L(J))<0;){var q=y(J);if(q.transform!=="none"||q.perspective!=="none"||q.contain==="paint"||["transform","perspective"].indexOf(q.willChange)!==-1||Q&&q.willChange==="filter"||Q&&q.filter&&q.filter!=="none")return J;J=J.parentNode}return null}(M)||p}var K="top",j="bottom",pe="right",se="left",le="auto",Ue=[K,j,pe,se],ye="start",tE="end",dE="viewport",me="popper",fE=Ue.reduce(function(M,p){return M.concat([p+"-"+ye,p+"-"+tE])},[]),TE=[].concat(Ue,[le]).reduce(function(M,p){return M.concat([p,p+"-"+ye,p+"-"+tE])},[]),pE=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function tt(M){var p=new Map,b=new Set,V=[];function Q(J){b.add(J.name),[].concat(J.requires||[],J.requiresIfExists||[]).forEach(function(q){if(!b.has(q)){var z=p.get(q);z&&Q(z)}}),V.push(J)}return M.forEach(function(J){p.set(J.name,J)}),M.forEach(function(J){b.has(J.name)||Q(J)}),V}var Tt={placement:"bottom",modifiers:[],strategy:"absolute"};function Ve(){for(var M=arguments.length,p=new Array(M),b=0;b<M;b++)p[b]=arguments[b];return!p.some(function(V){return!(V&&typeof V.getBoundingClientRect=="function")})}function ME(M){M===void 0&&(M={});var p=M,b=p.defaultModifiers,V=b===void 0?[]:b,Q=p.defaultOptions,J=Q===void 0?Tt:Q;return function(q,z,ee){ee===void 0&&(ee=J);var re,ne,te={placement:"bottom",orderedModifiers:[],options:Object.assign({},Tt,J),modifiersData:{},elements:{reference:q,popper:z},attributes:{},styles:{}},We=[],Oe=!1,Me={state:te,setOptions:function(oe){var we=typeof oe=="function"?oe(te.options):oe;De(),te.options=Object.assign({},J,te.options,we),te.scrollParents={reference:S(q)?U(q):q.contextElement?U(q.contextElement):[],popper:U(z)};var be,Ce,he=function(ie){var Ie=tt(ie);return pE.reduce(function(ue,de){return ue.concat(Ie.filter(function(He){return He.phase===de}))},[])}((be=[].concat(V,te.options.modifiers),Ce=be.reduce(function(ie,Ie){var ue=ie[Ie.name];return ie[Ie.name]=ue?Object.assign({},ue,Ie,{options:Object.assign({},ue.options,Ie.options),data:Object.assign({},ue.data,Ie.data)}):Ie,ie},{}),Object.keys(Ce).map(function(ie){return Ce[ie]})));return te.orderedModifiers=he.filter(function(ie){return ie.enabled}),te.orderedModifiers.forEach(function(ie){var Ie=ie.name,ue=ie.options,de=ue===void 0?{}:ue,He=ie.effect;if(typeof He=="function"){var ke=He({state:te,name:Ie,instance:Me,options:de});We.push(ke||function(){})}}),Me.update()},forceUpdate:function(){if(!Oe){var oe=te.elements,we=oe.reference,be=oe.popper;if(Ve(we,be)){te.rects={reference:a(we,w(be),te.options.strategy==="fixed"),popper:I(be)},te.reset=!1,te.placement=te.options.placement,te.orderedModifiers.forEach(function(He){return te.modifiersData[He.name]=Object.assign({},He.data)});for(var Ce=0;Ce<te.orderedModifiers.length;Ce++)if(te.reset!==!0){var he=te.orderedModifiers[Ce],ie=he.fn,Ie=he.options,ue=Ie===void 0?{}:Ie,de=he.name;typeof ie=="function"&&(te=ie({state:te,options:ue,name:de,instance:Me})||te)}else te.reset=!1,Ce=-1}}},update:(re=function(){return new Promise(function(oe){Me.forceUpdate(),oe(te)})},function(){return ne||(ne=new Promise(function(oe){Promise.resolve().then(function(){ne=void 0,oe(re())})})),ne}),destroy:function(){De(),Oe=!0}};if(!Ve(q,z))return Me;function De(){We.forEach(function(oe){return oe()}),We=[]}return Me.setOptions(ee).then(function(oe){!Oe&&ee.onFirstUpdate&&ee.onFirstUpdate(oe)}),Me}}var xe={passive:!0};function je(M){return M.split("-")[0]}function ve(M){return M.split("-")[1]}function Fe(M){return["top","bottom"].indexOf(M)>=0?"x":"y"}function Ee(M){var p,b=M.reference,V=M.element,Q=M.placement,J=Q?je(Q):null,q=Q?ve(Q):null,z=b.x+b.width/2-V.width/2,ee=b.y+b.height/2-V.height/2;switch(J){case K:p={x:z,y:b.y-V.height};break;case j:p={x:z,y:b.y+b.height};break;case pe:p={x:b.x+b.width,y:ee};break;case se:p={x:b.x-V.width,y:ee};break;default:p={x:b.x,y:b.y}}var re=J?Fe(J):null;if(re!=null){var ne=re==="y"?"height":"width";switch(q){case ye:p[re]=p[re]-(b[ne]/2-V[ne]/2);break;case tE:p[re]=p[re]+(b[ne]/2-V[ne]/2)}}return p}var Xe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ae(M){var p,b=M.popper,V=M.popperRect,Q=M.placement,J=M.variation,q=M.offsets,z=M.position,ee=M.gpuAcceleration,re=M.adaptive,ne=M.roundOffsets,te=M.isFixed,We=q.x,Oe=We===void 0?0:We,Me=q.y,De=Me===void 0?0:Me,oe=typeof ne=="function"?ne({x:Oe,y:De}):{x:Oe,y:De};Oe=oe.x,De=oe.y;var we=q.hasOwnProperty("x"),be=q.hasOwnProperty("y"),Ce=se,he=K,ie=window;if(re){var Ie=w(b),ue="clientHeight",de="clientWidth";Ie===n(b)&&y(Ie=c(b)).position!=="static"&&z==="absolute"&&(ue="scrollHeight",de="scrollWidth"),Ie=Ie,(Q===K||(Q===se||Q===pe)&&J===tE)&&(he=j,De-=(te&&ie.visualViewport?ie.visualViewport.height:Ie[ue])-V.height,De*=ee?1:-1),Q!==se&&(Q!==K&&Q!==j||J!==tE)||(Ce=pe,Oe-=(te&&ie.visualViewport?ie.visualViewport.width:Ie[de])-V.width,Oe*=ee?1:-1)}var He,ke=Object.assign({position:z},re&&Xe),Ke=ne===!0?function(sE){var NE=sE.x,PE=sE.y,SE=window.devicePixelRatio||1;return{x:d(NE*SE)/SE||0,y:d(PE*SE)/SE||0}}({x:Oe,y:De}):{x:Oe,y:De};return Oe=Ke.x,De=Ke.y,ee?Object.assign({},ke,((He={})[he]=be?"0":"",He[Ce]=we?"0":"",He.transform=(ie.devicePixelRatio||1)<=1?"translate("+Oe+"px, "+De+"px)":"translate3d("+Oe+"px, "+De+"px, 0)",He)):Object.assign({},ke,((p={})[he]=be?De+"px":"",p[Ce]=we?Oe+"px":"",p.transform="",p))}var gE={left:"right",right:"left",bottom:"top",top:"bottom"};function at(M){return M.replace(/left|right|bottom|top/g,function(p){return gE[p]})}var jR={start:"end",end:"start"};function DT(M){return M.replace(/start|end/g,function(p){return jR[p]})}function dT(M,p){var b=p.getRootNode&&p.getRootNode();if(M.contains(p))return!0;if(b&&N(b)){var V=p;do{if(V&&M.isSameNode(V))return!0;V=V.parentNode||V.host}while(V)}return!1}function yt(M){return Object.assign({},M,{left:M.x,top:M.y,right:M.x+M.width,bottom:M.y+M.height})}function pT(M,p){return p===dE?yt(function(b){var V=n(b),Q=c(b),J=V.visualViewport,q=Q.clientWidth,z=Q.clientHeight,ee=0,re=0;return J&&(q=J.width,z=J.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(ee=J.offsetLeft,re=J.offsetTop)),{width:q,height:z,x:ee+H(b),y:re}}(M)):S(p)?function(b){var V=C(b);return V.top=V.top+b.clientTop,V.left=V.left+b.clientLeft,V.bottom=V.top+b.clientHeight,V.right=V.left+b.clientWidth,V.width=b.clientWidth,V.height=b.clientHeight,V.x=V.left,V.y=V.top,V}(p):yt(function(b){var V,Q=c(b),J=_(b),q=(V=b.ownerDocument)==null?void 0:V.body,z=u(Q.scrollWidth,Q.clientWidth,q?q.scrollWidth:0,q?q.clientWidth:0),ee=u(Q.scrollHeight,Q.clientHeight,q?q.scrollHeight:0,q?q.clientHeight:0),re=-J.scrollLeft+H(b),ne=-J.scrollTop;return y(q||Q).direction==="rtl"&&(re+=u(Q.clientWidth,q?q.clientWidth:0)-z),{width:z,height:ee,x:re,y:ne}}(c(M)))}function MT(M){return Object.assign({},{top:0,right:0,bottom:0,left:0},M)}function UT(M,p){return p.reduce(function(b,V){return b[V]=M,b},{})}function rt(M,p){p===void 0&&(p={});var b=p,V=b.placement,Q=V===void 0?M.placement:V,J=b.boundary,q=J===void 0?"clippingParents":J,z=b.rootBoundary,ee=z===void 0?dE:z,re=b.elementContext,ne=re===void 0?me:re,te=b.altBoundary,We=te!==void 0&&te,Oe=b.padding,Me=Oe===void 0?0:Oe,De=MT(typeof Me!="number"?Me:UT(Me,Ue)),oe=ne===me?"reference":me,we=M.rects.popper,be=M.elements[We?oe:ne],Ce=function(Ke,sE,NE){var PE=sE==="clippingParents"?function(Be){var UE=U(f(Be)),oE=["absolute","fixed"].indexOf(y(Be).position)>=0&&O(Be)?w(Be):Be;return S(oE)?UE.filter(function(rE){return S(rE)&&dT(rE,oE)&&L(rE)!=="body"}):[]}(Ke):[].concat(sE),SE=[].concat(PE,[NE]),EE=SE[0],$e=SE.reduce(function(Be,UE){var oE=pT(Ke,UE);return Be.top=u(oE.top,Be.top),Be.right=D(oE.right,Be.right),Be.bottom=D(oE.bottom,Be.bottom),Be.left=u(oE.left,Be.left),Be},pT(Ke,EE));return $e.width=$e.right-$e.left,$e.height=$e.bottom-$e.top,$e.x=$e.left,$e.y=$e.top,$e}(S(be)?be:be.contextElement||c(M.elements.popper),q,ee),he=C(M.elements.reference),ie=Ee({reference:he,element:we,strategy:"absolute",placement:Q}),Ie=yt(Object.assign({},we,ie)),ue=ne===me?Ie:he,de={top:Ce.top-ue.top+De.top,bottom:ue.bottom-Ce.bottom+De.bottom,left:Ce.left-ue.left+De.left,right:ue.right-Ce.right+De.right},He=M.modifiersData.offset;if(ne===me&&He){var ke=He[Q];Object.keys(de).forEach(function(Ke){var sE=[pe,j].indexOf(Ke)>=0?1:-1,NE=[K,j].indexOf(Ke)>=0?"y":"x";de[Ke]+=ke[NE]*sE})}return de}function Rt(M,p,b){return u(M,D(p,b))}function mT(M,p,b){return b===void 0&&(b={x:0,y:0}),{top:M.top-p.height-b.y,right:M.right-p.width+b.x,bottom:M.bottom-p.height+b.y,left:M.left-p.width-b.x}}function hT(M){return[K,pe,j,se].some(function(p){return M[p]>=0})}var zR=ME({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(M){var p=M.state,b=M.instance,V=M.options,Q=V.scroll,J=Q===void 0||Q,q=V.resize,z=q===void 0||q,ee=n(p.elements.popper),re=[].concat(p.scrollParents.reference,p.scrollParents.popper);return J&&re.forEach(function(ne){ne.addEventListener("scroll",b.update,xe)}),z&&ee.addEventListener("resize",b.update,xe),function(){J&&re.forEach(function(ne){ne.removeEventListener("scroll",b.update,xe)}),z&&ee.removeEventListener("resize",b.update,xe)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(M){var p=M.state,b=M.name;p.modifiersData[b]=Ee({reference:p.rects.reference,element:p.rects.popper,strategy:"absolute",placement:p.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(M){var p=M.state,b=M.options,V=b.gpuAcceleration,Q=V===void 0||V,J=b.adaptive,q=J===void 0||J,z=b.roundOffsets,ee=z===void 0||z,re={placement:je(p.placement),variation:ve(p.placement),popper:p.elements.popper,popperRect:p.rects.popper,gpuAcceleration:Q,isFixed:p.options.strategy==="fixed"};p.modifiersData.popperOffsets!=null&&(p.styles.popper=Object.assign({},p.styles.popper,Ae(Object.assign({},re,{offsets:p.modifiersData.popperOffsets,position:p.options.strategy,adaptive:q,roundOffsets:ee})))),p.modifiersData.arrow!=null&&(p.styles.arrow=Object.assign({},p.styles.arrow,Ae(Object.assign({},re,{offsets:p.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:ee})))),p.attributes.popper=Object.assign({},p.attributes.popper,{"data-popper-placement":p.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(M){var p=M.state;Object.keys(p.elements).forEach(function(b){var V=p.styles[b]||{},Q=p.attributes[b]||{},J=p.elements[b];O(J)&&L(J)&&(Object.assign(J.style,V),Object.keys(Q).forEach(function(q){var z=Q[q];z===!1?J.removeAttribute(q):J.setAttribute(q,z===!0?"":z)}))})},effect:function(M){var p=M.state,b={popper:{position:p.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(p.elements.popper.style,b.popper),p.styles=b,p.elements.arrow&&Object.assign(p.elements.arrow.style,b.arrow),function(){Object.keys(p.elements).forEach(function(V){var Q=p.elements[V],J=p.attributes[V]||{},q=Object.keys(p.styles.hasOwnProperty(V)?p.styles[V]:b[V]).reduce(function(z,ee){return z[ee]="",z},{});O(Q)&&L(Q)&&(Object.assign(Q.style,q),Object.keys(J).forEach(function(z){Q.removeAttribute(z)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(M){var p=M.state,b=M.options,V=M.name,Q=b.offset,J=Q===void 0?[0,0]:Q,q=TE.reduce(function(ne,te){return ne[te]=function(We,Oe,Me){var De=je(We),oe=[se,K].indexOf(De)>=0?-1:1,we=typeof Me=="function"?Me(Object.assign({},Oe,{placement:We})):Me,be=we[0],Ce=we[1];return be=be||0,Ce=(Ce||0)*oe,[se,pe].indexOf(De)>=0?{x:Ce,y:be}:{x:be,y:Ce}}(te,p.rects,J),ne},{}),z=q[p.placement],ee=z.x,re=z.y;p.modifiersData.popperOffsets!=null&&(p.modifiersData.popperOffsets.x+=ee,p.modifiersData.popperOffsets.y+=re),p.modifiersData[V]=q}},{name:"flip",enabled:!0,phase:"main",fn:function(M){var p=M.state,b=M.options,V=M.name;if(!p.modifiersData[V]._skip){for(var Q=b.mainAxis,J=Q===void 0||Q,q=b.altAxis,z=q===void 0||q,ee=b.fallbackPlacements,re=b.padding,ne=b.boundary,te=b.rootBoundary,We=b.altBoundary,Oe=b.flipVariations,Me=Oe===void 0||Oe,De=b.allowedAutoPlacements,oe=p.options.placement,we=je(oe),be=ee||(we!==oe&&Me?function(rE){if(je(rE)===le)return[];var lE=at(rE);return[DT(rE),lE,DT(lE)]}(oe):[at(oe)]),Ce=[oe].concat(be).reduce(function(rE,lE){return rE.concat(je(lE)===le?function(WE,mE){mE===void 0&&(mE={});var _E=mE,It=_E.placement,Nt=_E.boundary,wE=_E.rootBoundary,Bt=_E.padding,vt=_E.flipVariations,xE=_E.allowedAutoPlacements,Ft=xE===void 0?TE:xE,nt=ve(It),lt=nt?vt?fE:fE.filter(function(uE){return ve(uE)===nt}):Ue,$E=lt.filter(function(uE){return Ft.indexOf(uE)>=0});$E.length===0&&($E=lt);var XE=$E.reduce(function(uE,HE){return uE[HE]=rt(WE,{placement:HE,boundary:Nt,rootBoundary:wE,padding:Bt})[je(HE)],uE},{});return Object.keys(XE).sort(function(uE,HE){return XE[uE]-XE[HE]})}(p,{placement:lE,boundary:ne,rootBoundary:te,padding:re,flipVariations:Me,allowedAutoPlacements:De}):lE)},[]),he=p.rects.reference,ie=p.rects.popper,Ie=new Map,ue=!0,de=Ce[0],He=0;He<Ce.length;He++){var ke=Ce[He],Ke=je(ke),sE=ve(ke)===ye,NE=[K,j].indexOf(Ke)>=0,PE=NE?"width":"height",SE=rt(p,{placement:ke,boundary:ne,rootBoundary:te,altBoundary:We,padding:re}),EE=NE?sE?pe:se:sE?j:K;he[PE]>ie[PE]&&(EE=at(EE));var $e=at(EE),Be=[];if(J&&Be.push(SE[Ke]<=0),z&&Be.push(SE[EE]<=0,SE[$e]<=0),Be.every(function(rE){return rE})){de=ke,ue=!1;break}Ie.set(ke,Be)}if(ue)for(var UE=function(rE){var lE=Ce.find(function(WE){var mE=Ie.get(WE);if(mE)return mE.slice(0,rE).every(function(_E){return _E})});if(lE)return de=lE,"break"},oE=Me?3:1;oE>0&&UE(oE)!=="break";oE--);p.placement!==de&&(p.modifiersData[V]._skip=!0,p.placement=de,p.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(M){var p=M.state,b=M.options,V=M.name,Q=b.mainAxis,J=Q===void 0||Q,q=b.altAxis,z=q!==void 0&&q,ee=b.boundary,re=b.rootBoundary,ne=b.altBoundary,te=b.padding,We=b.tether,Oe=We===void 0||We,Me=b.tetherOffset,De=Me===void 0?0:Me,oe=rt(p,{boundary:ee,rootBoundary:re,padding:te,altBoundary:ne}),we=je(p.placement),be=ve(p.placement),Ce=!be,he=Fe(we),ie=he==="x"?"y":"x",Ie=p.modifiersData.popperOffsets,ue=p.rects.reference,de=p.rects.popper,He=typeof De=="function"?De(Object.assign({},p.rects,{placement:p.placement})):De,ke=typeof He=="number"?{mainAxis:He,altAxis:He}:Object.assign({mainAxis:0,altAxis:0},He),Ke=p.modifiersData.offset?p.modifiersData.offset[p.placement]:null,sE={x:0,y:0};if(Ie){if(J){var NE,PE=he==="y"?K:se,SE=he==="y"?j:pe,EE=he==="y"?"height":"width",$e=Ie[he],Be=$e+oe[PE],UE=$e-oe[SE],oE=Oe?-de[EE]/2:0,rE=be===ye?ue[EE]:de[EE],lE=be===ye?-de[EE]:-ue[EE],WE=p.elements.arrow,mE=Oe&&WE?I(WE):{width:0,height:0},_E=p.modifiersData["arrow#persistent"]?p.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},It=_E[PE],Nt=_E[SE],wE=Rt(0,ue[EE],mE[EE]),Bt=Ce?ue[EE]/2-oE-wE-It-ke.mainAxis:rE-wE-It-ke.mainAxis,vt=Ce?-ue[EE]/2+oE+wE+Nt+ke.mainAxis:lE+wE+Nt+ke.mainAxis,xE=p.elements.arrow&&w(p.elements.arrow),Ft=xE?he==="y"?xE.clientTop||0:xE.clientLeft||0:0,nt=(NE=Ke==null?void 0:Ke[he])!=null?NE:0,lt=$e+vt-nt,$E=Rt(Oe?D(Be,$e+Bt-nt-Ft):Be,$e,Oe?u(UE,lt):UE);Ie[he]=$E,sE[he]=$E-$e}if(z){var XE,uE=he==="x"?K:se,HE=he==="x"?j:pe,bE=Ie[ie],_t=ie==="y"?"height":"width",GT=bE+oe[uE],gT=bE-oe[HE],Yt=[K,se].indexOf(we)!==-1,HT=(XE=Ke==null?void 0:Ke[ie])!=null?XE:0,bT=Yt?GT:bE-ue[_t]-de[_t]-HT+ke.altAxis,yT=Yt?bE+ue[_t]+de[_t]-HT-ke.altAxis:gT,BT=Oe&&Yt?function(en,En,Vt){var vT=Rt(en,En,Vt);return vT>Vt?Vt:vT}(bT,bE,yT):Rt(Oe?bT:GT,bE,Oe?yT:gT);Ie[ie]=BT,sE[ie]=BT-bE}p.modifiersData[V]=sE}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(M){var p,b=M.state,V=M.name,Q=M.options,J=b.elements.arrow,q=b.modifiersData.popperOffsets,z=je(b.placement),ee=Fe(z),re=[se,pe].indexOf(z)>=0?"height":"width";if(J&&q){var ne=function(de,He){return MT(typeof(de=typeof de=="function"?de(Object.assign({},He.rects,{placement:He.placement})):de)!="number"?de:UT(de,Ue))}(Q.padding,b),te=I(J),We=ee==="y"?K:se,Oe=ee==="y"?j:pe,Me=b.rects.reference[re]+b.rects.reference[ee]-q[ee]-b.rects.popper[re],De=q[ee]-b.rects.reference[ee],oe=w(J),we=oe?ee==="y"?oe.clientHeight||0:oe.clientWidth||0:0,be=Me/2-De/2,Ce=ne[We],he=we-te[re]-ne[Oe],ie=we/2-te[re]/2+be,Ie=Rt(Ce,ie,he),ue=ee;b.modifiersData[V]=((p={})[ue]=Ie,p.centerOffset=Ie-ie,p)}},effect:function(M){var p=M.state,b=M.options.element,V=b===void 0?"[data-popper-arrow]":b;V!=null&&(typeof V!="string"||(V=p.elements.popper.querySelector(V)))&&dT(p.elements.popper,V)&&(p.elements.arrow=V)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(M){var p=M.state,b=M.name,V=p.rects.reference,Q=p.rects.popper,J=p.modifiersData.preventOverflow,q=rt(p,{elementContext:"reference"}),z=rt(p,{altBoundary:!0}),ee=mT(q,V),re=mT(z,Q,J),ne=hT(ee),te=hT(re);p.modifiersData[b]={referenceClippingOffsets:ee,popperEscapeOffsets:re,isReferenceHidden:ne,hasPopperEscaped:te},p.attributes.popper=Object.assign({},p.attributes.popper,{"data-popper-reference-hidden":ne,"data-popper-escaped":te})}}]})}},t={};function r(A){var s=t[A];if(s!==void 0)return s.exports;var o=t[A]={exports:{}};return T[A](o,o.exports,r),o.exports}r.d=(A,s)=>{for(var o in s)r.o(s,o)&&!r.o(A,o)&&Object.defineProperty(A,o,{enumerable:!0,get:s[o]})},r.o=(A,s)=>Object.prototype.hasOwnProperty.call(A,s),r.r=A=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})};var R={};return r.r(R),r(661),r(795),r(682),r(284),r(181),r(778),r(51),r(185),R})()})})(Kn);function Jn(E){let e=E[0].title+"",T;return{c(){T=Re(e)},m(t,r){W(t,T,r)},p(t,r){r&1&&e!==(e=t[0].title+"")&&Pe(T,e)},d(t){t&&Y(T)}}}function qn(E){let e,T;return{c(){e=Re("Welcome to "),T=P("span"),T.textContent="Vanna.AI",i(T,"class","nav-title")},m(t,r){W(t,e,r),W(t,T,r)},p:Z,d(t){t&&(Y(e),Y(T))}}}function Qn(E){let e,T,t,r,R=E[0].subtitle+"",A;function s(S,O){return S[0].title=="Welcome to Vanna.AI"?qn:Jn}let o=s(E),n=o(E);return{c(){e=P("div"),T=P("h1"),n.c(),t=x(),r=P("p"),A=Re(R),i(T,"class","text-3xl font-bold text-gray-800 sm:text-4xl dark:text-white"),i(r,"class","mt-3 text-gray-600 dark:text-gray-400"),i(e,"class","max-w-4xl px-4 sm:px-6 lg:px-8 mx-auto text-center")},m(S,O){W(S,e,O),l(e,T),n.m(T,null),l(e,t),l(e,r),l(r,A)},p(S,[O]){o===(o=s(S))&&n?n.p(S,O):(n.d(1),n=o(S),n&&(n.c(),n.m(T,null))),O&1&&R!==(R=S[0].subtitle+"")&&Pe(A,R)},i:Z,o:Z,d(S){S&&Y(e),n.d()}}}function Zn(E,e,T){let t;return RE(E,FE,r=>T(0,t=r)),[t]}class jn extends Le{constructor(e){super(),_e(this,e,Zn,Qn,Ne,{})}}function zn(E){let e,T;const t=E[1].default,r=pt(t,E,E[0],null);return{c(){e=P("p"),r&&r.c(),i(e,"class","text-gray-800 dark:text-gray-200")},m(R,A){W(R,e,A),r&&r.m(e,null),T=!0},p(R,[A]){r&&r.p&&(!T||A&1)&&Ut(r,t,R,R[0],T?Mt(t,R[0],A,null):mt(R[0]),null)},i(R){T||(G(r,R),T=!0)},o(R){B(r,R),T=!1},d(R){R&&Y(e),r&&r.d(R)}}}function eA(E,e,T){let{$$slots:t={},$$scope:r}=e;return E.$$set=R=>{"$$scope"in R&&T(0,r=R.$$scope)},[r,t]}class IE extends Le{constructor(e){super(),_e(this,e,eA,zn,Ne,{})}}function EA(E){let e;return{c(){e=Re(E[0])},m(T,t){W(T,e,t)},p(T,t){t&1&&Pe(e,T[0])},d(T){T&&Y(e)}}}function tA(E){let e,T,t,r,R,A,s,o,n;s=new IE({props:{$$slots:{default:[EA]},$$scope:{ctx:E}}});const S=E[1].default,O=pt(S,E,E[2],null);return{c(){e=P("li"),T=P("div"),t=P("div"),r=P("span"),r.innerHTML='<span class="text-sm font-medium text-white leading-none">You</span>',R=x(),A=P("div"),k(s.$$.fragment),o=x(),O&&O.c(),i(r,"class","flex-shrink-0 inline-flex items-center justify-center h-[2.375rem] w-[2.375rem] rounded-full bg-gray-600"),i(A,"class","grow mt-2 space-y-3"),i(t,"class","max-w-2xl flex gap-x-2 sm:gap-x-4"),i(T,"class","max-w-4xl px-4 sm:px-6 lg:px-8 mx-auto"),i(e,"class","py-2 sm:py-4")},m(N,u){W(N,e,u),l(e,T),l(T,t),l(t,r),l(t,R),l(t,A),$(s,A,null),l(A,o),O&&O.m(A,null),n=!0},p(N,[u]){const D={};u&5&&(D.$$scope={dirty:u,ctx:N}),s.$set(D),O&&O.p&&(!n||u&4)&&Ut(O,S,N,N[2],n?Mt(S,N[2],u,null):mt(N[2]),null)},i(N){n||(G(s.$$.fragment,N),G(O,N),n=!0)},o(N){B(s.$$.fragment,N),B(O,N),n=!1},d(N){N&&Y(e),X(s),O&&O.d(N)}}}function TA(E,e,T){let{$$slots:t={},$$scope:r}=e,{message:R}=e;return E.$$set=A=>{"message"in A&&T(0,R=A.message),"$$scope"in A&&T(2,r=A.$$scope)},[R,t,r]}class YE extends Le{constructor(e){super(),_e(this,e,TA,tA,Ne,{message:0})}}function rA(E){let e,T,t;return{c(){e=P("button"),e.innerHTML='<svg class="flex-shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2"></path><line x1="12" x2="12" y1="19" y2="22"></line></svg>',i(e,"type","button"),i(e,"class","inline-flex flex-shrink-0 justify-center items-center size-8 rounded-lg text-gray-500 hover:text-blue-600 focus:z-10 focus:outline-none focus:ring-2 focus:ring-blue-500 dark:hover:text-blue-500 dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-gray-600")},m(r,R){W(r,e,R),T||(t=ae(e,"click",E[1]),T=!0)},p:Z,d(r){r&&Y(e),T=!1,t()}}}function RA(E){let e;return{c(){e=P("button"),e.innerHTML='<svg class="flex-shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2"></path><line x1="12" x2="12" y1="19" y2="22"></line></svg>',i(e,"type","button"),i(e,"class","animate-ping animate-pulse inline-flex flex-shrink-0 justify-center items-center size-8 rounded-lg text-red-500 hover:text-red-600 focus:z-10 focus:outline-none focus:ring-2 focus:ring-red-500 dark:hover:text-red-500 dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-red-600")},m(T,t){W(T,e,t)},p:Z,d(T){T&&Y(e)}}}function nA(E){let e;function T(R,A){return R[0]?RA:rA}let t=T(E),r=t(E);return{c(){r.c(),e=Ze()},m(R,A){r.m(R,A),W(R,e,A)},p(R,[A]){t===(t=T(R))&&r?r.p(R,A):(r.d(1),r=t(R),r&&(r.c(),r.m(e.parentNode,e)))},i:Z,o:Z,d(R){R&&Y(e),r.d(R)}}}function AA(E,e,T){let{newMessage:t}=e,r=!1;function R(){if(T(0,r=!0),DR.set(!0),"webkitSpeechRecognition"in window)var A=new window.webkitSpeechRecognition;else var A=new window.SpeechRecognition;A.lang="en-US",A.start(),A.onresult=s=>{const o=s.results[0][0].transcript;console.log(o),T(2,t=o),T(0,r=!1)},A.onend=()=>{T(0,r=!1)},A.onerror=()=>{T(0,r=!1)}}return E.$$set=A=>{"newMessage"in A&&T(2,t=A.newMessage)},[r,R,t]}class sA extends Le{constructor(e){super(),_e(this,e,AA,nA,Ne,{newMessage:2})}}function SA(E){let e,T,t,r,R,A,s,o,n,S,O,N,u,D,d;function C(L){E[5](L)}let _={};return E[0]!==void 0&&(_.newMessage=E[0]),n=new sA({props:_}),oT.push(()=>Ln(n,"newMessage",C)),{c(){e=P("div"),T=P("input"),t=x(),r=P("div"),R=P("div"),A=P("div"),A.innerHTML="",s=x(),o=P("div"),k(n.$$.fragment),O=x(),N=P("button"),N.innerHTML='<svg class="h-3.5 w-3.5" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path d="M15.964.686a.5.5 0 0 0-.65-.65L.767 5.855H.766l-.452.18a.5.5 0 0 0-.082.887l.41.26.001.002 4.995 3.178 3.178 4.995.002.002.26.41a.5.5 0 0 0 .886-.083l6-15Zm-1.833 1.89L6.637 10.07l-.215-.338a.5.5 0 0 0-.154-.154l-.338-.215 7.494-7.494 1.178-.471-.47 1.178Z"></path></svg>',i(T,"type","text"),i(T,"class","p-4 pb-12 block w-full bg-gray-100 border-gray-200 rounded-md text-sm focus:border-blue-500 focus:ring-blue-500 dark:bg-slate-800 dark:border-gray-700 dark:text-gray-400"),i(T,"placeholder","Ask me a question about your data that I can turn into SQL."),i(A,"class","flex items-center"),i(N,"type","button"),i(N,"class","inline-flex flex-shrink-0 justify-center items-center h-8 w-8 rounded-md text-white bg-blue-600 hover:bg-blue-500 focus:z-10 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all"),i(o,"class","flex items-center gap-x-1"),i(R,"class","flex justify-between items-center"),i(r,"class","absolute bottom-px inset-x-px p-2 rounded-b-md bg-gray-100 dark:bg-slate-800"),i(e,"class","relative")},m(L,c){W(L,e,c),l(e,T),Ye(T,E[0]),l(e,t),l(e,r),l(r,R),l(R,A),l(R,s),l(R,o),$(n,o,null),l(o,O),l(o,N),u=!0,D||(d=[ae(T,"input",E[4]),ae(T,"keydown",E[1]),ae(N,"click",E[2])],D=!0)},p(L,[c]){c&1&&T.value!==L[0]&&Ye(T,L[0]);const H={};!S&&c&1&&(S=!0,H.newMessage=L[0],an(()=>S=!1)),n.$set(H)},i(L){u||(G(n.$$.fragment,L),u=!0)},o(L){B(n.$$.fragment,L),u=!1},d(L){L&&Y(e),X(n),D=!1,iE(d)}}}function oA(E,e,T){let{onSubmit:t}=e,r="";function R(n){n.key==="Enter"&&(t(r),n.preventDefault())}function A(){t(r)}function s(){r=this.value,T(0,r)}function o(n){r=n,T(0,r)}return E.$$set=n=>{"onSubmit"in n&&T(3,t=n.onSubmit)},[r,R,A,t,s,o]}class OA extends Le{constructor(e){super(),_e(this,e,oA,SA,Ne,{onSubmit:3})}}function iA(E){let e;return{c(){e=P("div"),e.innerHTML='<button type="button" class="p-2 inline-flex justify-center items-center gap-1.5 rounded-md border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 transition-all text-xs dark:bg-slate-900 dark:hover:bg-slate-800 dark:border-gray-700 dark:text-gray-400 dark:hover:text-white dark:focus:ring-offset-gray-800" data-hs-overlay="#application-sidebar" aria-controls="application-sidebar" aria-label="Toggle navigation"><svg class="w-3.5 h-3.5" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5z"></path></svg> <span>Sidebar</span></button>',i(e,"class","lg:hidden flex justify-end mb-2 sm:mb-3")},m(T,t){W(T,e,t)},p:Z,i:Z,o:Z,d(T){T&&Y(e)}}}class aA extends Le{constructor(e){super(),_e(this,e,null,iA,Ne,{})}}function IA(E){let e,T,t,r;return{c(){e=P("button"),T=Re(E[0]),i(e,"type","button"),i(e,"class","mb-2.5 mr-1.5 py-2 px-3 inline-flex justify-center items-center gap-x-2 rounded-md border border-blue-600 bg-white text-blue-600 align-middle hover:bg-blue-50 text-sm dark:bg-slate-900 dark:text-blue-500 dark:border-blue-500 dark:hover:text-blue-400 dark:hover:border-blue-400")},m(R,A){W(R,e,A),l(e,T),t||(r=ae(e,"click",E[1]),t=!0)},p(R,[A]){A&1&&Pe(T,R[0])},i:Z,o:Z,d(R){R&&Y(e),t=!1,r()}}}function NA(E,e,T){let{message:t}=e,{onSubmit:r}=e;function R(){r(t)}return E.$$set=A=>{"message"in A&&T(0,t=A.message),"onSubmit"in A&&T(2,r=A.onSubmit)},[t,R,r]}class CE extends Le{constructor(e){super(),_e(this,e,NA,IA,Ne,{message:0,onSubmit:2})}}function lA(E){let e,T,t,r,R,A,s,o,n,S,O;return{c(){e=P("span"),T=OE("svg"),t=OE("defs"),r=OE("linearGradient"),R=OE("stop"),A=OE("stop"),s=OE("g"),o=OE("g"),n=OE("path"),S=OE("path"),i(R,"offset","0"),i(R,"stop-color","#009efd"),i(A,"offset","1"),i(A,"stop-color","#2af598"),i(r,"gradientTransform","matrix(1.09331 0 0 1.09331 -47.1838 -88.8946)"),i(r,"gradientUnits","userSpaceOnUse"),i(r,"id","LinearGradient"),i(r,"x1","237.82"),i(r,"x2","785.097"),i(r,"y1","549.609"),i(r,"y2","549.609"),i(n,"d","M117.718 228.798C117.718 119.455 206.358 30.8151 315.701 30.8151L708.299 30.8151C817.642 30.8151 906.282 119.455 906.282 228.798L906.282 795.202C906.282 904.545 817.642 993.185 708.299 993.185L315.701 993.185C206.358 993.185 117.718 904.545 117.718 795.202L117.718 228.798Z"),i(n,"fill","#0f172a"),i(n,"fill-rule","nonzero"),i(n,"opacity","1"),i(n,"stroke","#374151"),i(n,"stroke-linecap","butt"),i(n,"stroke-linejoin","round"),i(n,"stroke-width","20"),i(S,"d","M212.828 215.239C213.095 281.169 213.629 413.028 213.629 413.028C213.629 413.028 511.51 808.257 513.993 809.681C612.915 677.809 810.759 414.065 810.759 414.065C810.759 414.065 811.034 280.901 811.172 214.319C662.105 362.973 662.105 362.973 513.038 511.627C362.933 363.433 362.933 363.433 212.828 215.239Z"),i(S,"fill","url(#LinearGradient)"),i(S,"fill-rule","nonzero"),i(S,"opacity","1"),i(S,"stroke","none"),i(o,"opacity","1"),i(s,"id","Layer-1"),i(T,"height","100%"),i(T,"stroke-miterlimit","10"),Ct(T,"fill-rule","nonzero"),Ct(T,"clip-rule","evenodd"),Ct(T,"stroke-linecap","round"),Ct(T,"stroke-linejoin","round"),i(T,"version","1.1"),i(T,"viewBox","0 0 1024 1024"),i(T,"width","100%"),i(T,"xml:space","preserve"),i(T,"xmlns","http://www.w3.org/2000/svg"),i(e,"class",O="flex-shrink-0 w-[2.375rem] h-[2.375rem] "+E[0])},m(N,u){W(N,e,u),l(e,T),l(T,t),l(t,r),l(r,R),l(r,A),l(T,s),l(s,o),l(o,n),l(o,S)},p(N,[u]){u&1&&O!==(O="flex-shrink-0 w-[2.375rem] h-[2.375rem] "+N[0])&&i(e,"class",O)},i:Z,o:Z,d(N){N&&Y(e)}}}function _A(E,e,T){let t,{animate:r=!1}=e;return E.$$set=R=>{"animate"in R&&T(1,r=R.animate)},E.$$.update=()=>{E.$$.dirty&2&&T(0,t=r?"animate-bounce":"")},[t,r]}class MR extends Le{constructor(e){super(),_e(this,e,_A,lA,Ne,{animate:1})}}function LA(E){let e,T,t,r,R;T=new MR({});const A=E[1].default,s=pt(A,E,E[0],null);return{c(){e=P("li"),k(T.$$.fragment),t=x(),r=P("div"),s&&s.c(),i(r,"class","space-y-3 overflow-x-auto overflow-y-hidden whitespace-break-spaces w-full"),i(e,"class","max-w-4xl py-2 px-4 sm:px-6 lg:px-8 mx-auto flex gap-x-2 sm:gap-x-4")},m(o,n){W(o,e,n),$(T,e,null),l(e,t),l(e,r),s&&s.m(r,null),R=!0},p(o,[n]){s&&s.p&&(!R||n&1)&&Ut(s,A,o,o[0],R?Mt(A,o[0],n,null):mt(o[0]),null)},i(o){R||(G(T.$$.fragment,o),G(s,o),R=!0)},o(o){B(T.$$.fragment,o),B(s,o),R=!1},d(o){o&&Y(e),X(T),s&&s.d(o)}}}function CA(E,e,T){let{$$slots:t={},$$scope:r}=e;return E.$$set=R=>{"$$scope"in R&&T(0,r=R.$$scope)},[r,t]}class ze extends Le{constructor(e){super(),_e(this,e,CA,LA,Ne,{})}}function uA(E){let e;return{c(){e=Re("Thinking...")},m(T,t){W(T,e,t)},d(T){T&&Y(e)}}}function cA(E){let e,T,t,r,R,A;return T=new MR({props:{animate:!0}}),R=new IE({props:{$$slots:{default:[uA]},$$scope:{ctx:E}}}),{c(){e=P("li"),k(T.$$.fragment),t=x(),r=P("div"),k(R.$$.fragment),i(r,"class","space-y-3"),i(e,"class","max-w-4xl py-2 px-4 sm:px-6 lg:px-8 mx-auto flex gap-x-2 sm:gap-x-4")},m(s,o){W(s,e,o),$(T,e,null),l(e,t),l(e,r),$(R,r,null),A=!0},p(s,[o]){const n={};o&1&&(n.$$scope={dirty:o,ctx:s}),R.$set(n)},i(s){A||(G(T.$$.fragment,s),G(R.$$.fragment,s),A=!0)},o(s){B(T.$$.fragment,s),B(R.$$.fragment,s),A=!1},d(s){s&&Y(e),X(T),X(R)}}}class fA extends Le{constructor(e){super(),_e(this,e,null,cA,Ne,{})}}function PA(E){let e,T,t,r,R,A,s,o,n,S,O;return{c(){e=P("ul"),T=P("li"),t=P("div"),r=P("span"),r.textContent="CSV",R=x(),A=P("a"),s=OE("svg"),o=OE("path"),n=OE("path"),S=Re(`
          Download`),i(r,"class","mr-3 flex-1 w-0 truncate"),i(o,"d","M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5z"),i(n,"d","M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3z"),i(s,"class","flex-shrink-0 w-3 h-3"),i(s,"width","16"),i(s,"height","16"),i(s,"viewBox","0 0 16 16"),i(s,"fill","currentColor"),i(A,"class","flex items-center gap-x-2 text-gray-500 hover:text-blue-500 whitespace-nowrap"),i(A,"href",O="/api/v0/download_csv?id="+E[0]),i(t,"class","w-full flex justify-between truncate"),i(T,"class","flex items-center gap-x-2 p-3 text-sm bg-white border text-gray-800 first:rounded-t-lg first:mt-0 last:rounded-b-lg dark:bg-slate-900 dark:border-gray-700 dark:text-gray-200"),i(e,"class","flex flex-col justify-end text-start -space-y-px")},m(N,u){W(N,e,u),l(e,T),l(T,t),l(t,r),l(t,R),l(t,A),l(A,s),l(s,o),l(s,n),l(A,S)},p(N,[u]){u&1&&O!==(O="/api/v0/download_csv?id="+N[0])&&i(A,"href",O)},i:Z,o:Z,d(N){N&&Y(e)}}}function DA(E,e,T){let{id:t}=e;return E.$$set=r=>{"id"in r&&T(0,t=r.id)},[t]}class dA extends Le{constructor(e){super(),_e(this,e,DA,PA,Ne,{id:0})}}function kT(E,e,T){const t=E.slice();return t[5]=e[T],t}function KT(E,e,T){const t=E.slice();return t[8]=e[T],t}function JT(E,e,T){const t=E.slice();return t[8]=e[T],t}function qT(E){let e,T,t,r;return{c(){e=P("th"),T=P("div"),t=P("span"),t.textContent=`${E[8]}`,r=x(),i(t,"class","text-xs font-semibold uppercase tracking-wide text-gray-800 dark:text-gray-200"),i(T,"class","flex items-center gap-x-2"),i(e,"scope","col"),i(e,"class","px-6 py-3 text-left")},m(R,A){W(R,e,A),l(e,T),l(T,t),l(e,r)},p:Z,d(R){R&&Y(e)}}}function QT(E){let e,T,t;return{c(){e=P("td"),T=P("div"),t=P("span"),t.textContent=`${E[5][E[8]]}`,i(t,"class","text-gray-800 dark:text-gray-200"),i(T,"class","px-6 py-3"),i(e,"class","h-px w-px whitespace-nowrap")},m(r,R){W(r,e,R),l(e,T),l(T,t)},p:Z,d(r){r&&Y(e)}}}function ZT(E){let e,T,t=ce(E[3]),r=[];for(let R=0;R<t.length;R+=1)r[R]=QT(KT(E,t,R));return{c(){e=P("tr");for(let R=0;R<r.length;R+=1)r[R].c();T=x()},m(R,A){W(R,e,A);for(let s=0;s<r.length;s+=1)r[s]&&r[s].m(e,null);l(e,T)},p(R,A){if(A&12){t=ce(R[3]);let s;for(s=0;s<t.length;s+=1){const o=KT(R,t,s);r[s]?r[s].p(o,A):(r[s]=QT(o),r[s].c(),r[s].m(e,T))}for(;s<r.length;s+=1)r[s].d(1);r.length=t.length}},d(R){R&&Y(e),nE(r,R)}}}function jT(E){let e,T;return e=new dA({props:{id:E[0]}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&1&&(R.id=t[0]),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function pA(E){let e,T,t,r,R,A,s,o,n,S,O,N=ce(E[3]),u=[];for(let _=0;_<N.length;_+=1)u[_]=qT(JT(E,N,_));let D=ce(E[2]),d=[];for(let _=0;_<D.length;_+=1)d[_]=ZT(kT(E,D,_));let C=E[1].csv_download&&jT(E);return{c(){e=P("div"),T=P("div"),t=P("div"),r=P("table"),R=P("thead"),A=P("tr");for(let _=0;_<u.length;_+=1)u[_].c();s=x(),o=P("tbody");for(let _=0;_<d.length;_+=1)d[_].c();n=x(),C&&C.c(),S=Ze(),i(R,"class","bg-gray-50 dark:bg-slate-800"),i(o,"class","divide-y divide-gray-200 dark:divide-gray-700"),i(r,"class","min-w-full divide-y divide-gray-200 dark:divide-gray-700"),i(t,"class","p-1.5 min-w-full inline-block align-middle"),i(T,"class","-m-1.5 overflow-x-auto"),i(e,"class","bg-white border border-gray-200 rounded-xl shadow-sm overflow-hidden dark:bg-slate-900 dark:border-gray-700")},m(_,L){W(_,e,L),l(e,T),l(T,t),l(t,r),l(r,R),l(R,A);for(let c=0;c<u.length;c+=1)u[c]&&u[c].m(A,null);l(r,s),l(r,o);for(let c=0;c<d.length;c+=1)d[c]&&d[c].m(o,null);W(_,n,L),C&&C.m(_,L),W(_,S,L),O=!0},p(_,[L]){if(L&8){N=ce(_[3]);let c;for(c=0;c<N.length;c+=1){const H=JT(_,N,c);u[c]?u[c].p(H,L):(u[c]=qT(H),u[c].c(),u[c].m(A,null))}for(;c<u.length;c+=1)u[c].d(1);u.length=N.length}if(L&12){D=ce(_[2]);let c;for(c=0;c<D.length;c+=1){const H=kT(_,D,c);d[c]?d[c].p(H,L):(d[c]=ZT(H),d[c].c(),d[c].m(o,null))}for(;c<d.length;c+=1)d[c].d(1);d.length=D.length}_[1].csv_download?C?(C.p(_,L),L&2&&G(C,1)):(C=jT(_),C.c(),G(C,1),C.m(S.parentNode,S)):C&&(Ge(),B(C,1,1,()=>{C=null}),ge())},i(_){O||(G(C),O=!0)},o(_){B(C),O=!1},d(_){_&&(Y(e),Y(n),Y(S)),nE(u,_),nE(d,_),C&&C.d(_)}}}function MA(E,e,T){let t;RE(E,FE,o=>T(1,t=o));let{id:r}=e,{df:R}=e,A=JSON.parse(R),s=A.length>0?Object.keys(A[0]):[];return E.$$set=o=>{"id"in o&&T(0,r=o.id),"df"in o&&T(4,R=o.df)},[r,t,A,s,R]}class UR extends Le{constructor(e){super(),_e(this,e,MA,pA,Ne,{id:0,df:4})}}function UA(E){let e;return{c(){e=P("div"),i(e,"id",E[0])},m(T,t){W(T,e,t)},p:Z,i:Z,o:Z,d(T){T&&Y(e)}}}function mA(E,e,T){let{fig:t}=e,r=JSON.parse(t),R=Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);return fR(()=>{Plotly.newPlot(document.getElementById(R),r,{responsive:!0})}),E.$$set=A=>{"fig"in A&&T(1,t=A.fig)},[R,t]}class mR extends Le{constructor(e){super(),_e(this,e,mA,UA,Ne,{fig:1})}}function hA(E){let e,T,t,r;return{c(){e=P("button"),T=Re(E[0]),i(e,"type","button"),i(e,"class","mb-2.5 mr-1.5 py-3 px-4 inline-flex justify-center items-center gap-2 rounded-md border-2 border-green-200 font-semibold text-green-500 hover:text-white hover:bg-green-500 hover:border-green-500 focus:outline-none focus:ring-2 focus:ring-green-200 focus:ring-offset-2 transition-all text-sm dark:focus:ring-offset-gray-800")},m(R,A){W(R,e,A),l(e,T),t||(r=ae(e,"click",E[1]),t=!0)},p(R,[A]){A&1&&Pe(T,R[0])},i:Z,o:Z,d(R){R&&Y(e),t=!1,r()}}}function GA(E,e,T){let{message:t}=e,{onSubmit:r}=e;function R(){r(t)}return E.$$set=A=>{"message"in A&&T(0,t=A.message),"onSubmit"in A&&T(2,r=A.onSubmit)},[t,R,r]}class hR extends Le{constructor(e){super(),_e(this,e,GA,hA,Ne,{message:0,onSubmit:2})}}function gA(E){let e,T,t,r,R,A,s,o,n;return{c(){e=P("div"),T=P("div"),t=P("div"),t.innerHTML='<svg class="h-4 w-4 text-yellow-400 mt-0.5" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path d="M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"></path></svg>',r=x(),R=P("div"),A=P("h3"),A.textContent="Error",s=x(),o=P("div"),n=Re(E[0]),i(t,"class","flex-shrink-0"),i(A,"class","text-sm text-yellow-800 font-semibold"),i(o,"class","mt-1 text-sm text-yellow-700"),i(R,"class","ml-4"),i(T,"class","flex"),i(e,"class","bg-yellow-50 border border-yellow-200 rounded-md p-4"),i(e,"role","alert")},m(S,O){W(S,e,O),l(e,T),l(T,t),l(T,r),l(T,R),l(R,A),l(R,s),l(R,o),l(o,n)},p(S,[O]){O&1&&Pe(n,S[0])},i:Z,o:Z,d(S){S&&Y(e)}}}function HA(E,e,T){let{message:t}=e;return E.$$set=r=>{"message"in r&&T(0,t=r.message)},[t]}let fT=class extends Le{constructor(e){super(),_e(this,e,HA,gA,Ne,{message:0})}};function bA(E){let e,T;const t=E[1].default,r=pt(t,E,E[0],null);return{c(){e=P("div"),r&&r.c(),i(e,"class","font-mono whitespace-pre-wrap")},m(R,A){W(R,e,A),r&&r.m(e,null),T=!0},p(R,[A]){r&&r.p&&(!T||A&1)&&Ut(r,t,R,R[0],T?Mt(t,R[0],A,null):mt(R[0]),null)},i(R){T||(G(r,R),T=!0)},o(R){B(r,R),T=!1},d(R){R&&Y(e),r&&r.d(R)}}}function yA(E,e,T){let{$$slots:t={},$$scope:r}=e;return E.$$set=R=>{"$$scope"in R&&T(0,r=R.$$scope)},[r,t]}class GR extends Le{constructor(e){super(),_e(this,e,yA,bA,Ne,{})}}function BA(E){let e;return{c(){e=Re(E[1])},m(T,t){W(T,e,t)},p(T,t){t&2&&Pe(e,T[1])},d(T){T&&Y(e)}}}function vA(E){let e,T,t,r,R,A,s,o;return t=new CE({props:{message:"Run SQL",onSubmit:E[3]}}),R=new IE({props:{$$slots:{default:[BA]},$$scope:{ctx:E}}}),{c(){e=P("textarea"),T=x(),k(t.$$.fragment),r=x(),k(R.$$.fragment),i(e,"rows","6"),i(e,"class","block p-2.5 w-full text-blue-600 hover:text-blue-500 dark:text-blue-500 dark:hover:text-blue-400 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500 font-mono"),i(e,"placeholder","SELECT col1, col2, col3 FROM ...")},m(n,S){W(n,e,S),Ye(e,E[1]),W(n,T,S),$(t,n,S),W(n,r,S),$(R,n,S),A=!0,s||(o=ae(e,"input",E[2]),s=!0)},p(n,[S]){S&2&&Ye(e,n[1]);const O={};S&3&&(O.onSubmit=n[3]),t.$set(O);const N={};S&18&&(N.$$scope={dirty:S,ctx:n}),R.$set(N)},i(n){A||(G(t.$$.fragment,n),G(R.$$.fragment,n),A=!0)},o(n){B(t.$$.fragment,n),B(R.$$.fragment,n),A=!1},d(n){n&&(Y(e),Y(T),Y(r)),X(t,n),X(R,n),s=!1,o()}}}function FA(E,e,T){let t;RE(E,zE,s=>T(1,t=s));let{onSubmit:r}=e;function R(){t=this.value,zE.set(t)}const A=()=>r(t);return E.$$set=s=>{"onSubmit"in s&&T(0,r=s.onSubmit)},[r,t,R,A]}class YA extends Le{constructor(e){super(),_e(this,e,FA,vA,Ne,{onSubmit:0})}}function VA(E){let e,T,t,r,R,A;return t=new CE({props:{message:E[3],onSubmit:E[5]}}),{c(){e=P("textarea"),T=x(),k(t.$$.fragment),i(e,"rows","6"),i(e,"class","block p-2.5 w-full text-blue-600 hover:text-blue-500 dark:text-blue-500 dark:hover:text-blue-400 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500 font-mono"),i(e,"placeholder",E[2])},m(s,o){W(s,e,o),Ye(e,E[0]),W(s,T,o),$(t,s,o),r=!0,R||(A=ae(e,"input",E[4]),R=!0)},p(s,[o]){(!r||o&4)&&i(e,"placeholder",s[2]),o&1&&Ye(e,s[0]);const n={};o&8&&(n.message=s[3]),o&3&&(n.onSubmit=s[5]),t.$set(n)},i(s){r||(G(t.$$.fragment,s),r=!0)},o(s){B(t.$$.fragment,s),r=!1},d(s){s&&(Y(e),Y(T)),X(t,s),R=!1,A()}}}function WA(E,e,T){let{onSubmit:t}=e,{currentValue:r}=e,{placeholder:R}=e,{buttonText:A}=e;function s(){r=this.value,T(0,r)}const o=()=>t(r);return E.$$set=n=>{"onSubmit"in n&&T(1,t=n.onSubmit),"currentValue"in n&&T(0,r=n.currentValue),"placeholder"in n&&T(2,R=n.placeholder),"buttonText"in n&&T(3,A=n.buttonText)},[r,t,R,A,s,o]}class wA extends Le{constructor(e){super(),_e(this,e,WA,VA,Ne,{onSubmit:1,currentValue:0,placeholder:2,buttonText:3})}}function xA(E){let e,T;return e=new CE({props:{message:"Play",onSubmit:E[2]}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,[r]){const R={};r&1&&(R.onSubmit=t[2]),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function zT(E){if("speechSynthesis"in window){const e=new SpeechSynthesisUtterance(E);e.lang="en-US",e.volume=1,e.rate=1,e.pitch=1,window.speechSynthesis.speak(e)}else console.error("SpeechSynthesis API is not supported in this browser.")}function $A(E,e,T){let t;RE(E,DR,A=>T(1,t=A));let{message:r}=e;const R=()=>zT(r);return E.$$set=A=>{"message"in A&&T(0,r=A.message)},E.$$.update=()=>{E.$$.dirty&3&&t&&zT(r)},[r,t,R]}class XA extends Le{constructor(e){super(),_e(this,e,$A,xA,Ne,{message:0})}}function kA(E){let e,T,t;return{c(){e=P("button"),e.textContent="Open Debugger",T=x(),t=P("div"),t.innerHTML='<div class="flex justify-between items-center py-3 px-4 border-b dark:border-neutral-700"><h3 class="font-bold text-gray-800 dark:text-white">Server Logs</h3> <button type="button" class="flex justify-center items-center size-7 text-sm font-semibold rounded-full border border-transparent text-gray-800 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none dark:text-white dark:hover:bg-neutral-700" data-hs-overlay="#hs-overlay-right"><span class="sr-only">Close modal</span> <svg class="flex-shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"></path><path d="m6 6 12 12"></path></svg></button></div> <div class="p-4"><p id="log-contents" class="text-gray-800 dark:text-neutral-400"></p></div>',i(e,"type","button"),i(e,"class","absolute top-0 right-0 m-1 ms-0 py-3 px-4 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none"),i(e,"data-hs-overlay","#hs-overlay-right"),i(t,"id","hs-overlay-right"),i(t,"class","hs-overlay hs-overlay-open:translate-x-0 hidden translate-x-full fixed top-0 end-0 transition-all duration-300 transform h-full max-w-xs w-full z-[80] bg-white border-s dark:bg-neutral-800 dark:border-neutral-700 [--body-scroll:true] overflow-y-auto"),i(t,"tabindex","-1")},m(r,R){W(r,e,R),W(r,T,R),W(r,t,R)},p:Z,i:Z,o:Z,d(r){r&&(Y(e),Y(T),Y(t))}}}class KA extends Le{constructor(e){super(),_e(this,e,null,kA,Ne,{})}}var gR={exports:{}};(function(E){(function(e,T){E.exports?E.exports=T():e.nearley=T()})(Xn,function(){function e(n,S,O){return this.id=++e.highestId,this.name=n,this.symbols=S,this.postprocess=O,this}e.highestId=0,e.prototype.toString=function(n){var S=typeof n>"u"?this.symbols.map(o).join(" "):this.symbols.slice(0,n).map(o).join(" ")+" ● "+this.symbols.slice(n).map(o).join(" ");return this.name+" → "+S};function T(n,S,O,N){this.rule=n,this.dot=S,this.reference=O,this.data=[],this.wantedBy=N,this.isComplete=this.dot===n.symbols.length}T.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},T.prototype.nextState=function(n){var S=new T(this.rule,this.dot+1,this.reference,this.wantedBy);return S.left=this,S.right=n,S.isComplete&&(S.data=S.build(),S.right=void 0),S},T.prototype.build=function(){var n=[],S=this;do n.push(S.right.data),S=S.left;while(S.left);return n.reverse(),n},T.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,A.fail))};function t(n,S){this.grammar=n,this.index=S,this.states=[],this.wants={},this.scannable=[],this.completed={}}t.prototype.process=function(n){for(var S=this.states,O=this.wants,N=this.completed,u=0;u<S.length;u++){var D=S[u];if(D.isComplete){if(D.finish(),D.data!==A.fail){for(var d=D.wantedBy,C=d.length;C--;){var _=d[C];this.complete(_,D)}if(D.reference===this.index){var L=D.rule.name;(this.completed[L]=this.completed[L]||[]).push(D)}}}else{var L=D.rule.symbols[D.dot];if(typeof L!="string"){this.scannable.push(D);continue}if(O[L]){if(O[L].push(D),N.hasOwnProperty(L))for(var c=N[L],C=0;C<c.length;C++){var H=c[C];this.complete(D,H)}}else O[L]=[D],this.predict(L)}}},t.prototype.predict=function(n){for(var S=this.grammar.byName[n]||[],O=0;O<S.length;O++){var N=S[O],u=this.wants[n],D=new T(N,0,this.index,u);this.states.push(D)}},t.prototype.complete=function(n,S){var O=n.nextState(S);this.states.push(O)};function r(n,S){this.rules=n,this.start=S||this.rules[0].name;var O=this.byName={};this.rules.forEach(function(N){O.hasOwnProperty(N.name)||(O[N.name]=[]),O[N.name].push(N)})}r.fromCompiled=function(N,S){var O=N.Lexer;N.ParserStart&&(S=N.ParserStart,N=N.ParserRules);var N=N.map(function(D){return new e(D.name,D.symbols,D.postprocess)}),u=new r(N,S);return u.lexer=O,u};function R(){this.reset("")}R.prototype.reset=function(n,S){this.buffer=n,this.index=0,this.line=S?S.line:1,this.lastLineBreak=S?-S.col:0},R.prototype.next=function(){if(this.index<this.buffer.length){var n=this.buffer[this.index++];return n===`
`&&(this.line+=1,this.lastLineBreak=this.index),{value:n}}},R.prototype.save=function(){return{line:this.line,col:this.index-this.lastLineBreak}},R.prototype.formatError=function(n,S){var O=this.buffer;if(typeof O=="string"){var N=O.split(`
`).slice(Math.max(0,this.line-5),this.line),u=O.indexOf(`
`,this.index);u===-1&&(u=O.length);var D=this.index-this.lastLineBreak,d=String(this.line).length;return S+=" at line "+this.line+" col "+D+`:

`,S+=N.map(function(_,L){return C(this.line-N.length+L+1,d)+" "+_},this).join(`
`),S+=`
`+C("",d+D)+`^
`,S}else return S+" at index "+(this.index-1);function C(_,L){var c=String(_);return Array(L-c.length+1).join(" ")+c}};function A(n,S,O){if(n instanceof r)var N=n,O=S;else var N=r.fromCompiled(n,S);this.grammar=N,this.options={keepHistory:!1,lexer:N.lexer||new R};for(var u in O||{})this.options[u]=O[u];this.lexer=this.options.lexer,this.lexerState=void 0;var D=new t(N,0);this.table=[D],D.wants[N.start]=[],D.predict(N.start),D.process(),this.current=0}A.fail={},A.prototype.feed=function(n){var S=this.lexer;S.reset(n,this.lexerState);for(var O;;){try{if(O=S.next(),!O)break}catch(a){var d=new t(this.grammar,this.current+1);this.table.push(d);var N=new Error(this.reportLexerError(a));throw N.offset=this.current,N.token=a.token,N}var u=this.table[this.current];this.options.keepHistory||delete this.table[this.current-1];var D=this.current+1,d=new t(this.grammar,D);this.table.push(d);for(var C=O.text!==void 0?O.text:O.value,_=S.constructor===R?O.value:O,L=u.scannable,c=L.length;c--;){var H=L[c],y=H.rule.symbols[H.dot];if(y.test?y.test(_):y.type?y.type===O.type:y.literal===C){var h=H.nextState({data:_,token:O,isToken:!0,reference:D-1});d.states.push(h)}}if(d.process(),d.states.length===0){var N=new Error(this.reportError(O));throw N.offset=this.current,N.token=O,N}this.options.keepHistory&&(u.lexerState=S.save()),this.current++}return u&&(this.lexerState=S.save()),this.results=this.finish(),this},A.prototype.reportLexerError=function(n){var S,O,N=n.token;return N?(S="input "+JSON.stringify(N.text[0])+" (lexer error)",O=this.lexer.formatError(N,"Syntax error")):(S="input (lexer error)",O=n.message),this.reportErrorCommon(O,S)},A.prototype.reportError=function(n){var S=(n.type?n.type+" token: ":"")+JSON.stringify(n.value!==void 0?n.value:n),O=this.lexer.formatError(n,"Syntax error");return this.reportErrorCommon(O,S)},A.prototype.reportErrorCommon=function(n,S){var O=[];O.push(n);var N=this.table.length-2,u=this.table[N],D=u.states.filter(function(C){var _=C.rule.symbols[C.dot];return _&&typeof _!="string"});if(D.length===0)O.push("Unexpected "+S+`. I did not expect any more input. Here is the state of my parse table:
`),this.displayStateStack(u.states,O);else{O.push("Unexpected "+S+`. Instead, I was expecting to see one of the following:
`);var d=D.map(function(C){return this.buildFirstStateStack(C,[])||[C]},this);d.forEach(function(C){var _=C[0],L=_.rule.symbols[_.dot],c=this.getSymbolDisplay(L);O.push("A "+c+" based on:"),this.displayStateStack(C,O)},this)}return O.push(""),O.join(`
`)},A.prototype.displayStateStack=function(n,S){for(var O,N=0,u=0;u<n.length;u++){var D=n[u],d=D.rule.toString(D.dot);d===O?N++:(N>0&&S.push("    ^ "+N+" more lines identical to this"),N=0,S.push("    "+d)),O=d}},A.prototype.getSymbolDisplay=function(n){return s(n)},A.prototype.buildFirstStateStack=function(n,S){if(S.indexOf(n)!==-1)return null;if(n.wantedBy.length===0)return[n];var O=n.wantedBy[0],N=[n].concat(S),u=this.buildFirstStateStack(O,N);return u===null?null:[n].concat(u)},A.prototype.save=function(){var n=this.table[this.current];return n.lexerState=this.lexerState,n},A.prototype.restore=function(n){var S=n.index;this.current=S,this.table[S]=n,this.table.splice(S+1),this.lexerState=n.lexerState,this.results=this.finish()},A.prototype.rewind=function(n){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[n])},A.prototype.finish=function(){var n=[],S=this.grammar.start,O=this.table[this.table.length-1];return O.states.forEach(function(N){N.rule.name===S&&N.dot===N.rule.symbols.length&&N.reference===0&&N.data!==A.fail&&n.push(N)}),n.map(function(N){return N.data})};function s(n){var S=typeof n;if(S==="string")return n;if(S==="object"){if(n.literal)return JSON.stringify(n.literal);if(n instanceof RegExp)return"character matching "+n;if(n.type)return n.type+" token";if(n.test)return"token matching "+String(n.test);throw new Error("Unknown symbol type: "+n)}}function o(n){var S=typeof n;if(S==="string")return n;if(S==="object"){if(n.literal)return JSON.stringify(n.literal);if(n instanceof RegExp)return n.toString();if(n.type)return"%"+n.type;if(n.test)return"<"+String(n.test)+">";throw new Error("Unknown symbol type: "+n)}}return{Parser:A,Grammar:r,Rule:e}})})(gR);var JA=gR.exports;const qA=kn(JA);var HR=Object.defineProperty,QA=Object.defineProperties,ZA=Object.getOwnPropertyDescriptors,dt=Object.getOwnPropertySymbols,bR=Object.prototype.hasOwnProperty,yR=Object.prototype.propertyIsEnumerable,er=(E,e,T)=>e in E?HR(E,e,{enumerable:!0,configurable:!0,writable:!0,value:T}):E[e]=T,eE=(E,e)=>{for(var T in e||(e={}))bR.call(e,T)&&er(E,T,e[T]);if(dt)for(var T of dt(e))yR.call(e,T)&&er(E,T,e[T]);return E},AE=(E,e)=>QA(E,ZA(e)),jA=(E,e)=>{var T={};for(var t in E)bR.call(E,t)&&e.indexOf(t)<0&&(T[t]=E[t]);if(E!=null&&dt)for(var t of dt(E))e.indexOf(t)<0&&yR.call(E,t)&&(T[t]=E[t]);return T},zA=(E,e)=>{for(var T in e)HR(E,T,{get:e[T],enumerable:!0})},BR={};zA(BR,{bigquery:()=>_s,db2:()=>hs,db2i:()=>Ys,hive:()=>Js,mariadb:()=>TS,mysql:()=>iS,n1ql:()=>hS,plsql:()=>YS,postgresql:()=>qS,redshift:()=>ro,singlestoredb:()=>nO,snowflake:()=>NO,spark:()=>ao,sql:()=>Ho,sqlite:()=>Po,tidb:()=>cS,transactsql:()=>Zo,trino:()=>wo});var v=E=>E.flatMap(es),es=E=>ct(ts(E)).map(Es),Es=E=>E.replace(/ +/g," ").trim(),ts=E=>({type:"mandatory_block",items:PT(E,0)[0]}),PT=(E,e,T)=>{const t=[];for(;E[e];){const[r,R]=Ts(E,e);if(t.push(r),e=R,E[e]==="|")e++;else if(E[e]==="}"||E[e]==="]"){if(T!==E[e])throw new Error(`Unbalanced parenthesis in: ${E}`);return e++,[t,e]}else if(e===E.length){if(T)throw new Error(`Unbalanced parenthesis in: ${E}`);return[t,e]}else throw new Error(`Unexpected "${E[e]}"`)}return[t,e]},Ts=(E,e)=>{const T=[];for(;;){const[t,r]=rs(E,e);if(t)T.push(t),e=r;else break}return T.length===1?[T[0],e]:[{type:"concatenation",items:T},e]},rs=(E,e)=>{if(E[e]==="{")return Rs(E,e+1);if(E[e]==="[")return ns(E,e+1);{let T="";for(;E[e]&&/[A-Za-z0-9_ ]/.test(E[e]);)T+=E[e],e++;return[T,e]}},Rs=(E,e)=>{const[T,t]=PT(E,e,"}");return[{type:"mandatory_block",items:T},t]},ns=(E,e)=>{const[T,t]=PT(E,e,"]");return[{type:"optional_block",items:T},t]},ct=E=>{if(typeof E=="string")return[E];if(E.type==="concatenation")return E.items.map(ct).reduce(As,[""]);if(E.type==="mandatory_block")return E.items.flatMap(ct);if(E.type==="optional_block")return["",...E.items.flatMap(ct)];throw new Error(`Unknown node type: ${E}`)},As=(E,e)=>{const T=[];for(const t of E)for(const r of e)T.push(t+r);return T},vR=(E=>(E.QUOTED_IDENTIFIER="QUOTED_IDENTIFIER",E.IDENTIFIER="IDENTIFIER",E.STRING="STRING",E.VARIABLE="VARIABLE",E.RESERVED_DATA_TYPE="RESERVED_DATA_TYPE",E.RESERVED_PARAMETERIZED_DATA_TYPE="RESERVED_PARAMETERIZED_DATA_TYPE",E.RESERVED_KEYWORD="RESERVED_KEYWORD",E.RESERVED_FUNCTION_NAME="RESERVED_FUNCTION_NAME",E.RESERVED_PHRASE="RESERVED_PHRASE",E.RESERVED_SET_OPERATION="RESERVED_SET_OPERATION",E.RESERVED_CLAUSE="RESERVED_CLAUSE",E.RESERVED_SELECT="RESERVED_SELECT",E.RESERVED_JOIN="RESERVED_JOIN",E.ARRAY_IDENTIFIER="ARRAY_IDENTIFIER",E.ARRAY_KEYWORD="ARRAY_KEYWORD",E.CASE="CASE",E.END="END",E.WHEN="WHEN",E.ELSE="ELSE",E.THEN="THEN",E.LIMIT="LIMIT",E.BETWEEN="BETWEEN",E.AND="AND",E.OR="OR",E.XOR="XOR",E.OPERATOR="OPERATOR",E.COMMA="COMMA",E.ASTERISK="ASTERISK",E.PROPERTY_ACCESS_OPERATOR="PROPERTY_ACCESS_OPERATOR",E.OPEN_PAREN="OPEN_PAREN",E.CLOSE_PAREN="CLOSE_PAREN",E.LINE_COMMENT="LINE_COMMENT",E.BLOCK_COMMENT="BLOCK_COMMENT",E.DISABLE_COMMENT="DISABLE_COMMENT",E.NUMBER="NUMBER",E.NAMED_PARAMETER="NAMED_PARAMETER",E.QUOTED_PARAMETER="QUOTED_PARAMETER",E.NUMBERED_PARAMETER="NUMBERED_PARAMETER",E.POSITIONAL_PARAMETER="POSITIONAL_PARAMETER",E.CUSTOM_PARAMETER="CUSTOM_PARAMETER",E.DELIMITER="DELIMITER",E.EOF="EOF",E))(vR||{}),FR=E=>({type:"EOF",raw:"«EOF»",text:"«EOF»",start:E}),et=FR(1/0),JE=E=>e=>e.type===E.type&&e.text===E.text,vE={ARRAY:JE({text:"ARRAY",type:"RESERVED_DATA_TYPE"}),BY:JE({text:"BY",type:"RESERVED_KEYWORD"}),SET:JE({text:"SET",type:"RESERVED_CLAUSE"}),STRUCT:JE({text:"STRUCT",type:"RESERVED_DATA_TYPE"}),WINDOW:JE({text:"WINDOW",type:"RESERVED_CLAUSE"}),VALUES:JE({text:"VALUES",type:"RESERVED_CLAUSE"})},YR=E=>E==="RESERVED_DATA_TYPE"||E==="RESERVED_KEYWORD"||E==="RESERVED_FUNCTION_NAME"||E==="RESERVED_PHRASE"||E==="RESERVED_CLAUSE"||E==="RESERVED_SELECT"||E==="RESERVED_SET_OPERATION"||E==="RESERVED_JOIN"||E==="ARRAY_KEYWORD"||E==="CASE"||E==="END"||E==="WHEN"||E==="ELSE"||E==="THEN"||E==="LIMIT"||E==="BETWEEN"||E==="AND"||E==="OR"||E==="XOR",ss=E=>E==="AND"||E==="OR"||E==="XOR",Ss=["KEYS.NEW_KEYSET","KEYS.ADD_KEY_FROM_RAW_BYTES","AEAD.DECRYPT_BYTES","AEAD.DECRYPT_STRING","AEAD.ENCRYPT","KEYS.KEYSET_CHAIN","KEYS.KEYSET_FROM_JSON","KEYS.KEYSET_TO_JSON","KEYS.ROTATE_KEYSET","KEYS.KEYSET_LENGTH","ANY_VALUE","ARRAY_AGG","AVG","CORR","COUNT","COUNTIF","COVAR_POP","COVAR_SAMP","MAX","MIN","ST_CLUSTERDBSCAN","STDDEV_POP","STDDEV_SAMP","STRING_AGG","SUM","VAR_POP","VAR_SAMP","ANY_VALUE","ARRAY_AGG","ARRAY_CONCAT_AGG","AVG","BIT_AND","BIT_OR","BIT_XOR","COUNT","COUNTIF","LOGICAL_AND","LOGICAL_OR","MAX","MIN","STRING_AGG","SUM","APPROX_COUNT_DISTINCT","APPROX_QUANTILES","APPROX_TOP_COUNT","APPROX_TOP_SUM","ARRAY_CONCAT","ARRAY_LENGTH","ARRAY_TO_STRING","GENERATE_ARRAY","GENERATE_DATE_ARRAY","GENERATE_TIMESTAMP_ARRAY","ARRAY_REVERSE","OFFSET","SAFE_OFFSET","ORDINAL","SAFE_ORDINAL","BIT_COUNT","PARSE_BIGNUMERIC","PARSE_NUMERIC","SAFE_CAST","CURRENT_DATE","EXTRACT","DATE","DATE_ADD","DATE_SUB","DATE_DIFF","DATE_TRUNC","DATE_FROM_UNIX_DATE","FORMAT_DATE","LAST_DAY","PARSE_DATE","UNIX_DATE","CURRENT_DATETIME","DATETIME","EXTRACT","DATETIME_ADD","DATETIME_SUB","DATETIME_DIFF","DATETIME_TRUNC","FORMAT_DATETIME","LAST_DAY","PARSE_DATETIME","ERROR","EXTERNAL_QUERY","S2_CELLIDFROMPOINT","S2_COVERINGCELLIDS","ST_ANGLE","ST_AREA","ST_ASBINARY","ST_ASGEOJSON","ST_ASTEXT","ST_AZIMUTH","ST_BOUNDARY","ST_BOUNDINGBOX","ST_BUFFER","ST_BUFFERWITHTOLERANCE","ST_CENTROID","ST_CENTROID_AGG","ST_CLOSESTPOINT","ST_CLUSTERDBSCAN","ST_CONTAINS","ST_CONVEXHULL","ST_COVEREDBY","ST_COVERS","ST_DIFFERENCE","ST_DIMENSION","ST_DISJOINT","ST_DISTANCE","ST_DUMP","ST_DWITHIN","ST_ENDPOINT","ST_EQUALS","ST_EXTENT","ST_EXTERIORRING","ST_GEOGFROM","ST_GEOGFROMGEOJSON","ST_GEOGFROMTEXT","ST_GEOGFROMWKB","ST_GEOGPOINT","ST_GEOGPOINTFROMGEOHASH","ST_GEOHASH","ST_GEOMETRYTYPE","ST_INTERIORRINGS","ST_INTERSECTION","ST_INTERSECTS","ST_INTERSECTSBOX","ST_ISCOLLECTION","ST_ISEMPTY","ST_LENGTH","ST_MAKELINE","ST_MAKEPOLYGON","ST_MAKEPOLYGONORIENTED","ST_MAXDISTANCE","ST_NPOINTS","ST_NUMGEOMETRIES","ST_NUMPOINTS","ST_PERIMETER","ST_POINTN","ST_SIMPLIFY","ST_SNAPTOGRID","ST_STARTPOINT","ST_TOUCHES","ST_UNION","ST_UNION_AGG","ST_WITHIN","ST_X","ST_Y","FARM_FINGERPRINT","MD5","SHA1","SHA256","SHA512","HLL_COUNT.INIT","HLL_COUNT.MERGE","HLL_COUNT.MERGE_PARTIAL","HLL_COUNT.EXTRACT","MAKE_INTERVAL","EXTRACT","JUSTIFY_DAYS","JUSTIFY_HOURS","JUSTIFY_INTERVAL","JSON_EXTRACT","JSON_QUERY","JSON_EXTRACT_SCALAR","JSON_VALUE","JSON_EXTRACT_ARRAY","JSON_QUERY_ARRAY","JSON_EXTRACT_STRING_ARRAY","JSON_VALUE_ARRAY","TO_JSON_STRING","ABS","SIGN","IS_INF","IS_NAN","IEEE_DIVIDE","RAND","SQRT","POW","POWER","EXP","LN","LOG","LOG10","GREATEST","LEAST","DIV","SAFE_DIVIDE","SAFE_MULTIPLY","SAFE_NEGATE","SAFE_ADD","SAFE_SUBTRACT","MOD","ROUND","TRUNC","CEIL","CEILING","FLOOR","COS","COSH","ACOS","ACOSH","SIN","SINH","ASIN","ASINH","TAN","TANH","ATAN","ATANH","ATAN2","RANGE_BUCKET","FIRST_VALUE","LAST_VALUE","NTH_VALUE","LEAD","LAG","PERCENTILE_CONT","PERCENTILE_DISC","NET.IP_FROM_STRING","NET.SAFE_IP_FROM_STRING","NET.IP_TO_STRING","NET.IP_NET_MASK","NET.IP_TRUNC","NET.IPV4_FROM_INT64","NET.IPV4_TO_INT64","NET.HOST","NET.PUBLIC_SUFFIX","NET.REG_DOMAIN","RANK","DENSE_RANK","PERCENT_RANK","CUME_DIST","NTILE","ROW_NUMBER","SESSION_USER","CORR","COVAR_POP","COVAR_SAMP","STDDEV_POP","STDDEV_SAMP","STDDEV","VAR_POP","VAR_SAMP","VARIANCE","ASCII","BYTE_LENGTH","CHAR_LENGTH","CHARACTER_LENGTH","CHR","CODE_POINTS_TO_BYTES","CODE_POINTS_TO_STRING","CONCAT","CONTAINS_SUBSTR","ENDS_WITH","FORMAT","FROM_BASE32","FROM_BASE64","FROM_HEX","INITCAP","INSTR","LEFT","LENGTH","LPAD","LOWER","LTRIM","NORMALIZE","NORMALIZE_AND_CASEFOLD","OCTET_LENGTH","REGEXP_CONTAINS","REGEXP_EXTRACT","REGEXP_EXTRACT_ALL","REGEXP_INSTR","REGEXP_REPLACE","REGEXP_SUBSTR","REPLACE","REPEAT","REVERSE","RIGHT","RPAD","RTRIM","SAFE_CONVERT_BYTES_TO_STRING","SOUNDEX","SPLIT","STARTS_WITH","STRPOS","SUBSTR","SUBSTRING","TO_BASE32","TO_BASE64","TO_CODE_POINTS","TO_HEX","TRANSLATE","TRIM","UNICODE","UPPER","CURRENT_TIME","TIME","EXTRACT","TIME_ADD","TIME_SUB","TIME_DIFF","TIME_TRUNC","FORMAT_TIME","PARSE_TIME","CURRENT_TIMESTAMP","EXTRACT","STRING","TIMESTAMP","TIMESTAMP_ADD","TIMESTAMP_SUB","TIMESTAMP_DIFF","TIMESTAMP_TRUNC","FORMAT_TIMESTAMP","PARSE_TIMESTAMP","TIMESTAMP_SECONDS","TIMESTAMP_MILLIS","TIMESTAMP_MICROS","UNIX_SECONDS","UNIX_MILLIS","UNIX_MICROS","GENERATE_UUID","COALESCE","IF","IFNULL","NULLIF","AVG","BIT_AND","BIT_OR","BIT_XOR","CORR","COUNT","COVAR_POP","COVAR_SAMP","EXACT_COUNT_DISTINCT","FIRST","GROUP_CONCAT","GROUP_CONCAT_UNQUOTED","LAST","MAX","MIN","NEST","NTH","QUANTILES","STDDEV","STDDEV_POP","STDDEV_SAMP","SUM","TOP","UNIQUE","VARIANCE","VAR_POP","VAR_SAMP","BIT_COUNT","BOOLEAN","BYTES","CAST","FLOAT","HEX_STRING","INTEGER","STRING","COALESCE","GREATEST","IFNULL","IS_INF","IS_NAN","IS_EXPLICITLY_DEFINED","LEAST","NVL","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATE","DATE_ADD","DATEDIFF","DAY","DAYOFWEEK","DAYOFYEAR","FORMAT_UTC_USEC","HOUR","MINUTE","MONTH","MSEC_TO_TIMESTAMP","NOW","PARSE_UTC_USEC","QUARTER","SEC_TO_TIMESTAMP","SECOND","STRFTIME_UTC_USEC","TIME","TIMESTAMP","TIMESTAMP_TO_MSEC","TIMESTAMP_TO_SEC","TIMESTAMP_TO_USEC","USEC_TO_TIMESTAMP","UTC_USEC_TO_DAY","UTC_USEC_TO_HOUR","UTC_USEC_TO_MONTH","UTC_USEC_TO_WEEK","UTC_USEC_TO_YEAR","WEEK","YEAR","FORMAT_IP","PARSE_IP","FORMAT_PACKED_IP","PARSE_PACKED_IP","JSON_EXTRACT","JSON_EXTRACT_SCALAR","ABS","ACOS","ACOSH","ASIN","ASINH","ATAN","ATANH","ATAN2","CEIL","COS","COSH","DEGREES","EXP","FLOOR","LN","LOG","LOG2","LOG10","PI","POW","RADIANS","RAND","ROUND","SIN","SINH","SQRT","TAN","TANH","REGEXP_MATCH","REGEXP_EXTRACT","REGEXP_REPLACE","CONCAT","INSTR","LEFT","LENGTH","LOWER","LPAD","LTRIM","REPLACE","RIGHT","RPAD","RTRIM","SPLIT","SUBSTR","UPPER","TABLE_DATE_RANGE","TABLE_DATE_RANGE_STRICT","TABLE_QUERY","HOST","DOMAIN","TLD","AVG","COUNT","MAX","MIN","STDDEV","SUM","CUME_DIST","DENSE_RANK","FIRST_VALUE","LAG","LAST_VALUE","LEAD","NTH_VALUE","NTILE","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","RANK","RATIO_TO_REPORT","ROW_NUMBER","CURRENT_USER","EVERY","FROM_BASE64","HASH","FARM_FINGERPRINT","IF","POSITION","SHA1","SOME","TO_BASE64","BQ.JOBS.CANCEL","BQ.REFRESH_MATERIALIZED_VIEW","OPTIONS","PIVOT","UNPIVOT"],os=["ALL","AND","ANY","AS","ASC","ASSERT_ROWS_MODIFIED","AT","BETWEEN","BY","CASE","CAST","COLLATE","CONTAINS","CREATE","CROSS","CUBE","CURRENT","DEFAULT","DEFINE","DESC","DISTINCT","ELSE","END","ENUM","ESCAPE","EXCEPT","EXCLUDE","EXISTS","EXTRACT","FALSE","FETCH","FOLLOWING","FOR","FROM","FULL","GROUP","GROUPING","GROUPS","HASH","HAVING","IF","IGNORE","IN","INNER","INTERSECT","INTO","IS","JOIN","LATERAL","LEFT","LIMIT","LOOKUP","MERGE","NATURAL","NEW","NO","NOT","NULL","NULLS","OF","ON","OR","ORDER","OUTER","OVER","PARTITION","PRECEDING","PROTO","RANGE","RECURSIVE","RESPECT","RIGHT","ROLLUP","ROWS","SELECT","SET","SOME","TABLE","TABLESAMPLE","THEN","TO","TREAT","TRUE","UNBOUNDED","UNION","UNNEST","USING","WHEN","WHERE","WINDOW","WITH","WITHIN","SAFE","LIKE","COPY","CLONE","IN","OUT","INOUT","RETURNS","LANGUAGE","CASCADE","RESTRICT","DETERMINISTIC"],Os=["ARRAY","BOOL","BYTES","DATE","DATETIME","GEOGRAPHY","INTERVAL","INT64","INT","SMALLINT","INTEGER","BIGINT","TINYINT","BYTEINT","NUMERIC","DECIMAL","BIGNUMERIC","BIGDECIMAL","FLOAT64","STRING","STRUCT","TIME","TIMEZONE"],is=v(["SELECT [ALL | DISTINCT] [AS STRUCT | AS VALUE]"]),as=v(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","QUALIFY","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","OMIT RECORD IF","INSERT [INTO]","VALUES","SET","MERGE [INTO]","WHEN [NOT] MATCHED [BY SOURCE | BY TARGET] [THEN]","UPDATE SET","CLUSTER BY","FOR SYSTEM_TIME AS OF","WITH CONNECTION","WITH PARTITION COLUMNS","REMOTE WITH CONNECTION"]),Er=v(["CREATE [OR REPLACE] [TEMP|TEMPORARY|SNAPSHOT|EXTERNAL] TABLE [IF NOT EXISTS]"]),xt=v(["CREATE [OR REPLACE] [MATERIALIZED] VIEW [IF NOT EXISTS]","UPDATE","DELETE [FROM]","DROP [SNAPSHOT | EXTERNAL] TABLE [IF EXISTS]","ALTER TABLE [IF EXISTS]","ADD COLUMN [IF NOT EXISTS]","DROP COLUMN [IF EXISTS]","RENAME TO","ALTER COLUMN [IF EXISTS]","SET DEFAULT COLLATE","SET OPTIONS","DROP NOT NULL","SET DATA TYPE","ALTER SCHEMA [IF EXISTS]","ALTER [MATERIALIZED] VIEW [IF EXISTS]","ALTER BI_CAPACITY","TRUNCATE TABLE","CREATE SCHEMA [IF NOT EXISTS]","DEFAULT COLLATE","CREATE [OR REPLACE] [TEMP|TEMPORARY|TABLE] FUNCTION [IF NOT EXISTS]","CREATE [OR REPLACE] PROCEDURE [IF NOT EXISTS]","CREATE [OR REPLACE] ROW ACCESS POLICY [IF NOT EXISTS]","GRANT TO","FILTER USING","CREATE CAPACITY","AS JSON","CREATE RESERVATION","CREATE ASSIGNMENT","CREATE SEARCH INDEX [IF NOT EXISTS]","DROP SCHEMA [IF EXISTS]","DROP [MATERIALIZED] VIEW [IF EXISTS]","DROP [TABLE] FUNCTION [IF EXISTS]","DROP PROCEDURE [IF EXISTS]","DROP ROW ACCESS POLICY","DROP ALL ROW ACCESS POLICIES","DROP CAPACITY [IF EXISTS]","DROP RESERVATION [IF EXISTS]","DROP ASSIGNMENT [IF EXISTS]","DROP SEARCH INDEX [IF EXISTS]","DROP [IF EXISTS]","GRANT","REVOKE","DECLARE","EXECUTE IMMEDIATE","LOOP","END LOOP","REPEAT","END REPEAT","WHILE","END WHILE","BREAK","LEAVE","CONTINUE","ITERATE","FOR","END FOR","BEGIN","BEGIN TRANSACTION","COMMIT TRANSACTION","ROLLBACK TRANSACTION","RAISE","RETURN","CALL","ASSERT","EXPORT DATA"]),Is=v(["UNION {ALL | DISTINCT}","EXCEPT DISTINCT","INTERSECT DISTINCT"]),Ns=v(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN"]),ls=v(["TABLESAMPLE SYSTEM","ANY TYPE","ALL COLUMNS","NOT DETERMINISTIC","{ROWS | RANGE} BETWEEN","IS [NOT] DISTINCT FROM"]),_s={name:"bigquery",tokenizerOptions:{reservedSelect:is,reservedClauses:[...as,...xt,...Er],reservedSetOperations:Is,reservedJoins:Ns,reservedPhrases:ls,reservedKeywords:os,reservedDataTypes:Os,reservedFunctionNames:Ss,extraParens:["[]"],stringTypes:[{quote:'""".."""',prefixes:["R","B","RB","BR"]},{quote:"\'\'\'..\'\'\'",prefixes:["R","B","RB","BR"]},'""-bs',"''-bs",{quote:'""-raw',prefixes:["R","B","RB","BR"],requirePrefix:!0},{quote:"''-raw",prefixes:["R","B","RB","BR"],requirePrefix:!0}],identTypes:["``"],identChars:{dashes:!0},paramTypes:{positional:!0,named:["@"],quoted:["@"]},variableTypes:[{regex:String.raw`@@\\w+`}],lineCommentTypes:["--","#"],operators:["&","|","^","~",">>","<<","||","=>"],postProcess:Ls},formatOptions:{onelineClauses:[...Er,...xt],tabularOnelineClauses:xt}};function Ls(E){return Cs(us(E))}function Cs(E){let e=et;return E.map(T=>T.text==="OFFSET"&&e.text==="["?(e=T,AE(eE({},T),{type:"RESERVED_FUNCTION_NAME"})):(e=T,T))}function us(E){var e;const T=[];for(let t=0;t<E.length;t++){const r=E[t];if((vE.ARRAY(r)||vE.STRUCT(r))&&((e=E[t+1])==null?void 0:e.text)==="<"){const R=cs(E,t+1),A=E.slice(t,R+1);T.push({type:"IDENTIFIER",raw:A.map(tr("raw")).join(""),text:A.map(tr("text")).join(""),start:r.start}),t=R}else T.push(r)}return T}var tr=E=>e=>e.type==="IDENTIFIER"||e.type==="COMMA"?e[E]+" ":e[E];function cs(E,e){let T=0;for(let t=e;t<E.length;t++){const r=E[t];if(r.text==="<"?T++:r.text===">"?T--:r.text===">>"&&(T-=2),T===0)return t}return E.length-1}var fs=["ARRAY_AGG","AVG","CORRELATION","COUNT","COUNT_BIG","COVARIANCE","COVARIANCE_SAMP","CUME_DIST","GROUPING","LISTAGG","MAX","MEDIAN","MIN","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_ICPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","STDDEV","STDDEV_SAMP","SUM","VARIANCE","VARIANCE_SAMP","XMLAGG","XMLGROUP","ABS","ABSVAL","ACOS","ADD_DAYS","ADD_HOURS","ADD_MINUTES","ADD_MONTHS","ADD_SECONDS","ADD_YEARS","AGE","ARRAY_DELETE","ARRAY_FIRST","ARRAY_LAST","ARRAY_NEXT","ARRAY_PRIOR","ASCII","ASCII_STR","ASIN","ATAN","ATAN2","ATANH","BITAND","BITANDNOT","BITOR","BITXOR","BITNOT","BPCHAR","BSON_TO_JSON","BTRIM","CARDINALITY","CEILING","CEIL","CHARACTER_LENGTH","CHR","COALESCE","COLLATION_KEY","COLLATION_KEY_BIT","COMPARE_DECFLOAT","CONCAT","COS","COSH","COT","CURSOR_ROWCOUNT","DATAPARTITIONNUM","DATE_PART","DATE_TRUNC","DAY","DAYNAME","DAYOFMONTH","DAYOFWEEK","DAYOFWEEK_ISO","DAYOFYEAR","DAYS","DAYS_BETWEEN","DAYS_TO_END_OF_MONTH","DBPARTITIONNUM","DECFLOAT","DECFLOAT_FORMAT","DECODE","DECRYPT_BIN","DECRYPT_CHAR","DEGREES","DEREF","DIFFERENCE","DIGITS","DOUBLE_PRECISION","EMPTY_BLOB","EMPTY_CLOB","EMPTY_DBCLOB","EMPTY_NCLOB","ENCRYPT","EVENT_MON_STATE","EXP","EXTRACT","FIRST_DAY","FLOOR","FROM_UTC_TIMESTAMP","GENERATE_UNIQUE","GETHINT","GREATEST","HASH","HASH4","HASH8","HASHEDVALUE","HEX","HEXTORAW","HOUR","HOURS_BETWEEN","IDENTITY_VAL_LOCAL","IFNULL","INITCAP","INSERT","INSTR","INSTR2","INSTR4","INSTRB","INTNAND","INTNOR","INTNXOR","INTNNOT","ISNULL","JSON_ARRAY","JSON_OBJECT","JSON_QUERY","JSON_TO_BSON","JSON_VALUE","JULIAN_DAY","LAST_DAY","LCASE","LEAST","LEFT","LENGTH","LENGTH2","LENGTH4","LENGTHB","LN","LOCATE","LOCATE_IN_STRING","LOG10","LONG_VARCHAR","LONG_VARGRAPHIC","LOWER","LPAD","LTRIM","MAX","MAX_CARDINALITY","MICROSECOND","MIDNIGHT_SECONDS","MIN","MINUTE","MINUTES_BETWEEN","MOD","MONTH","MONTHNAME","MONTHS_BETWEEN","MULTIPLY_ALT","NEXT_DAY","NEXT_MONTH","NEXT_QUARTER","NEXT_WEEK","NEXT_YEAR","NORMALIZE_DECFLOAT","NOW","NULLIF","NVL","NVL2","OCTET_LENGTH","OVERLAY","PARAMETER","POSITION","POSSTR","POW","POWER","QUANTIZE","QUARTER","QUOTE_IDENT","QUOTE_LITERAL","RADIANS","RAISE_ERROR","RAND","RANDOM","RAWTOHEX","REC2XML","REGEXP_COUNT","REGEXP_EXTRACT","REGEXP_INSTR","REGEXP_LIKE","REGEXP_MATCH_COUNT","REGEXP_REPLACE","REGEXP_SUBSTR","REPEAT","REPLACE","RID","RID_BIT","RIGHT","ROUND","ROUND_TIMESTAMP","RPAD","RTRIM","SECLABEL","SECLABEL_BY_NAME","SECLABEL_TO_CHAR","SECOND","SECONDS_BETWEEN","SIGN","SIN","SINH","SOUNDEX","SPACE","SQRT","STRIP","STRLEFT","STRPOS","STRRIGHT","SUBSTR","SUBSTR2","SUBSTR4","SUBSTRB","SUBSTRING","TABLE_NAME","TABLE_SCHEMA","TAN","TANH","THIS_MONTH","THIS_QUARTER","THIS_WEEK","THIS_YEAR","TIMESTAMP_FORMAT","TIMESTAMP_ISO","TIMESTAMPDIFF","TIMEZONE","TO_CHAR","TO_CLOB","TO_DATE","TO_HEX","TO_MULTI_BYTE","TO_NCHAR","TO_NCLOB","TO_NUMBER","TO_SINGLE_BYTE","TO_TIMESTAMP","TO_UTC_TIMESTAMP","TOTALORDER","TRANSLATE","TRIM","TRIM_ARRAY","TRUNC_TIMESTAMP","TRUNCATE","TRUNC","TYPE_ID","TYPE_NAME","TYPE_SCHEMA","UCASE","UNICODE_STR","UPPER","VALUE","VARCHAR_BIT_FORMAT","VARCHAR_FORMAT","VARCHAR_FORMAT_BIT","VERIFY_GROUP_FOR_USER","VERIFY_ROLE_FOR_USER","VERIFY_TRUSTED_CONTEXT_ROLE_FOR_USER","WEEK","WEEK_ISO","WEEKS_BETWEEN","WIDTH_BUCKET","XMLATTRIBUTES","XMLCOMMENT","XMLCONCAT","XMLDOCUMENT","XMLELEMENT","XMLFOREST","XMLNAMESPACES","XMLPARSE","XMLPI","XMLQUERY","XMLROW","XMLSERIALIZE","XMLTEXT","XMLVALIDATE","XMLXSROBJECTID","XSLTRANSFORM","YEAR","YEARS_BETWEEN","YMD_BETWEEN","BASE_TABLE","JSON_TABLE","UNNEST","XMLTABLE","RANK","DENSE_RANK","NTILE","LAG","LEAD","ROW_NUMBER","FIRST_VALUE","LAST_VALUE","NTH_VALUE","RATIO_TO_REPORT","CAST"],Ps=["ACTIVATE","ADD","AFTER","ALIAS","ALL","ALLOCATE","ALLOW","ALTER","AND","ANY","AS","ASENSITIVE","ASSOCIATE","ASUTIME","AT","ATTRIBUTES","AUDIT","AUTHORIZATION","AUX","AUXILIARY","BEFORE","BEGIN","BETWEEN","BINARY","BUFFERPOOL","BY","CACHE","CALL","CALLED","CAPTURE","CARDINALITY","CASCADED","CASE","CAST","CHECK","CLONE","CLOSE","CLUSTER","COLLECTION","COLLID","COLUMN","COMMENT","COMMIT","CONCAT","CONDITION","CONNECT","CONNECTION","CONSTRAINT","CONTAINS","CONTINUE","COUNT","COUNT_BIG","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_LC_CTYPE","CURRENT_PATH","CURRENT_SCHEMA","CURRENT_SERVER","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","CURRENT_USER","CURSOR","CYCLE","DATA","DATABASE","DATAPARTITIONNAME","DATAPARTITIONNUM","DAY","DAYS","DB2GENERAL","DB2GENRL","DB2SQL","DBINFO","DBPARTITIONNAME","DBPARTITIONNUM","DEALLOCATE","DECLARE","DEFAULT","DEFAULTS","DEFINITION","DELETE","DENSERANK","DENSE_RANK","DESCRIBE","DESCRIPTOR","DETERMINISTIC","DIAGNOSTICS","DISABLE","DISALLOW","DISCONNECT","DISTINCT","DO","DOCUMENT","DROP","DSSIZE","DYNAMIC","EACH","EDITPROC","ELSE","ELSEIF","ENABLE","ENCODING","ENCRYPTION","END","END-EXEC","ENDING","ERASE","ESCAPE","EVERY","EXCEPT","EXCEPTION","EXCLUDING","EXCLUSIVE","EXECUTE","EXISTS","EXIT","EXPLAIN","EXTENDED","EXTERNAL","EXTRACT","FENCED","FETCH","FIELDPROC","FILE","FINAL","FIRST1","FOR","FOREIGN","FREE","FROM","FULL","FUNCTION","GENERAL","GENERATED","GET","GLOBAL","GO","GOTO","GRANT","GRAPHIC","GROUP","HANDLER","HASH","HASHED_VALUE","HAVING","HINT","HOLD","HOUR","HOURS","IDENTITY","IF","IMMEDIATE","IMPORT","IN","INCLUDING","INCLUSIVE","INCREMENT","INDEX","INDICATOR","INDICATORS","INF","INFINITY","INHERIT","INNER","INOUT","INSENSITIVE","INSERT","INTEGRITY","INTERSECT","INTO","IS","ISNULL","ISOBID","ISOLATION","ITERATE","JAR","JAVA","JOIN","KEEP","KEY","LABEL","LANGUAGE","LAST3","LATERAL","LC_CTYPE","LEAVE","LEFT","LIKE","LIMIT","LINKTYPE","LOCAL","LOCALDATE","LOCALE","LOCALTIME","LOCALTIMESTAMP","LOCATOR","LOCATORS","LOCK","LOCKMAX","LOCKSIZE","LOOP","MAINTAINED","MATERIALIZED","MAXVALUE","MICROSECOND","MICROSECONDS","MINUTE","MINUTES","MINVALUE","MODE","MODIFIES","MONTH","MONTHS","NAN","NEW","NEW_TABLE","NEXTVAL","NO","NOCACHE","NOCYCLE","NODENAME","NODENUMBER","NOMAXVALUE","NOMINVALUE","NONE","NOORDER","NORMALIZED","NOT2","NOTNULL","NULL","NULLS","NUMPARTS","OBID","OF","OFF","OFFSET","OLD","OLD_TABLE","ON","OPEN","OPTIMIZATION","OPTIMIZE","OPTION","OR","ORDER","OUT","OUTER","OVER","OVERRIDING","PACKAGE","PADDED","PAGESIZE","PARAMETER","PART","PARTITION","PARTITIONED","PARTITIONING","PARTITIONS","PASSWORD","PATH","PERCENT","PIECESIZE","PLAN","POSITION","PRECISION","PREPARE","PREVVAL","PRIMARY","PRIQTY","PRIVILEGES","PROCEDURE","PROGRAM","PSID","PUBLIC","QUERY","QUERYNO","RANGE","RANK","READ","READS","RECOVERY","REFERENCES","REFERENCING","REFRESH","RELEASE","RENAME","REPEAT","RESET","RESIGNAL","RESTART","RESTRICT","RESULT","RESULT_SET_LOCATOR","RETURN","RETURNS","REVOKE","RIGHT","ROLE","ROLLBACK","ROUND_CEILING","ROUND_DOWN","ROUND_FLOOR","ROUND_HALF_DOWN","ROUND_HALF_EVEN","ROUND_HALF_UP","ROUND_UP","ROUTINE","ROW","ROWNUMBER","ROWS","ROWSET","ROW_NUMBER","RRN","RUN","SAVEPOINT","SCHEMA","SCRATCHPAD","SCROLL","SEARCH","SECOND","SECONDS","SECQTY","SECURITY","SELECT","SENSITIVE","SEQUENCE","SESSION","SESSION_USER","SET","SIGNAL","SIMPLE","SNAN","SOME","SOURCE","SPECIFIC","SQL","SQLID","STACKED","STANDARD","START","STARTING","STATEMENT","STATIC","STATMENT","STAY","STOGROUP","STORES","STYLE","SUBSTRING","SUMMARY","SYNONYM","SYSFUN","SYSIBM","SYSPROC","SYSTEM","SYSTEM_USER","TABLE","TABLESPACE","THEN","TO","TRANSACTION","TRIGGER","TRIM","TRUNCATE","TYPE","UNDO","UNION","UNIQUE","UNTIL","UPDATE","USAGE","USER","USING","VALIDPROC","VALUE","VALUES","VARIABLE","VARIANT","VCAT","VERSION","VIEW","VOLATILE","VOLUMES","WHEN","WHENEVER","WHERE","WHILE","WITH","WITHOUT","WLM","WRITE","XMLELEMENT","XMLEXISTS","XMLNAMESPACES","YEAR","YEARS"],Ds=["ARRAY","BIGINT","BINARY","BLOB","BOOLEAN","CCSID","CHAR","CHARACTER","CLOB","DATE","DATETIME","DBCLOB","DEC","DECIMAL","DOUBLE","DOUBLE PRECISION","FLOAT","FLOAT4","FLOAT8","GRAPHIC","INT","INT2","INT4","INT8","INTEGER","INTERVAL","LONG VARCHAR","LONG VARGRAPHIC","NCHAR","NCHR","NCLOB","NVARCHAR","NUMERIC","SMALLINT","REAL","TIME","TIMESTAMP","VARBINARY","VARCHAR","VARGRAPHIC"],ds=v(["SELECT [ALL | DISTINCT]"]),ps=v(["WITH","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY [INPUT SEQUENCE]","LIMIT","OFFSET","FETCH NEXT","FOR UPDATE [OF]","FOR {READ | FETCH} ONLY","FOR {RR | CS | UR | RS} [USE AND KEEP {SHARE | UPDATE | EXCLUSIVE} LOCKS]","WAIT FOR OUTCOME","SKIP LOCKED DATA","INTO","INSERT INTO","VALUES","SET","MERGE INTO","WHEN [NOT] MATCHED [THEN]","UPDATE SET","INSERT"]),Tr=v(["CREATE [GLOBAL TEMPORARY | EXTERNAL] TABLE [IF NOT EXISTS]"]),$t=v(["CREATE [OR REPLACE] VIEW","UPDATE","WHERE CURRENT OF","WITH {RR | RS | CS | UR}","DELETE FROM","DROP TABLE [IF EXISTS]","ALTER TABLE","ADD [COLUMN]","DROP [COLUMN]","RENAME COLUMN","ALTER [COLUMN]","SET DATA TYPE","SET NOT NULL","DROP {DEFAULT | GENERATED | NOT NULL}","TRUNCATE [TABLE]","ALLOCATE","ALTER AUDIT POLICY","ALTER BUFFERPOOL","ALTER DATABASE PARTITION GROUP","ALTER DATABASE","ALTER EVENT MONITOR","ALTER FUNCTION","ALTER HISTOGRAM TEMPLATE","ALTER INDEX","ALTER MASK","ALTER METHOD","ALTER MODULE","ALTER NICKNAME","ALTER PACKAGE","ALTER PERMISSION","ALTER PROCEDURE","ALTER SCHEMA","ALTER SECURITY LABEL COMPONENT","ALTER SECURITY POLICY","ALTER SEQUENCE","ALTER SERVER","ALTER SERVICE CLASS","ALTER STOGROUP","ALTER TABLESPACE","ALTER THRESHOLD","ALTER TRIGGER","ALTER TRUSTED CONTEXT","ALTER TYPE","ALTER USAGE LIST","ALTER USER MAPPING","ALTER VIEW","ALTER WORK ACTION SET","ALTER WORK CLASS SET","ALTER WORKLOAD","ALTER WRAPPER","ALTER XSROBJECT","ALTER STOGROUP","ALTER TABLESPACE","ALTER TRIGGER","ALTER TRUSTED CONTEXT","ALTER VIEW","ASSOCIATE [RESULT SET] {LOCATOR | LOCATORS}","AUDIT","BEGIN DECLARE SECTION","CALL","CLOSE","COMMENT ON","COMMIT [WORK]","CONNECT","CREATE [OR REPLACE] [PUBLIC] ALIAS","CREATE AUDIT POLICY","CREATE BUFFERPOOL","CREATE DATABASE PARTITION GROUP","CREATE EVENT MONITOR","CREATE [OR REPLACE] FUNCTION","CREATE FUNCTION MAPPING","CREATE HISTOGRAM TEMPLATE","CREATE [UNIQUE] INDEX","CREATE INDEX EXTENSION","CREATE [OR REPLACE] MASK","CREATE [SPECIFIC] METHOD","CREATE [OR REPLACE] MODULE","CREATE [OR REPLACE] NICKNAME","CREATE [OR REPLACE] PERMISSION","CREATE [OR REPLACE] PROCEDURE","CREATE ROLE","CREATE SCHEMA","CREATE SECURITY LABEL [COMPONENT]","CREATE SECURITY POLICY","CREATE [OR REPLACE] SEQUENCE","CREATE SERVICE CLASS","CREATE SERVER","CREATE STOGROUP","CREATE SYNONYM","CREATE [LARGE | REGULAR | {SYSTEM | USER} TEMPORARY] TABLESPACE","CREATE THRESHOLD","CREATE {TRANSFORM | TRANSFORMS} FOR","CREATE [OR REPLACE] TRIGGER","CREATE TRUSTED CONTEXT","CREATE [OR REPLACE] TYPE","CREATE TYPE MAPPING","CREATE USAGE LIST","CREATE USER MAPPING FOR","CREATE [OR REPLACE] VARIABLE","CREATE WORK ACTION SET","CREATE WORK CLASS SET","CREATE WORKLOAD","CREATE WRAPPER","DECLARE","DECLARE GLOBAL TEMPORARY TABLE","DESCRIBE [INPUT | OUTPUT]","DISCONNECT","DROP [PUBLIC] ALIAS","DROP AUDIT POLICY","DROP BUFFERPOOL","DROP DATABASE PARTITION GROUP","DROP EVENT MONITOR","DROP [SPECIFIC] FUNCTION","DROP FUNCTION MAPPING","DROP HISTOGRAM TEMPLATE","DROP INDEX [EXTENSION]","DROP MASK","DROP [SPECIFIC] METHOD","DROP MODULE","DROP NICKNAME","DROP PACKAGE","DROP PERMISSION","DROP [SPECIFIC] PROCEDURE","DROP ROLE","DROP SCHEMA","DROP SECURITY LABEL [COMPONENT]","DROP SECURITY POLICY","DROP SEQUENCE","DROP SERVER","DROP SERVICE CLASS","DROP STOGROUP","DROP TABLE HIERARCHY","DROP {TABLESPACE | TABLESPACES}","DROP {TRANSFORM | TRANSFORMS}","DROP THRESHOLD","DROP TRIGGER","DROP TRUSTED CONTEXT","DROP TYPE [MAPPING]","DROP USAGE LIST","DROP USER MAPPING FOR","DROP VARIABLE","DROP VIEW [HIERARCHY]","DROP WORK {ACTION | CLASS} SET","DROP WORKLOAD","DROP WRAPPER","DROP XSROBJECT","END DECLARE SECTION","EXECUTE [IMMEDIATE]","EXPLAIN {PLAN [SECTION] | ALL}","FETCH [FROM]","FLUSH {BUFFERPOOL | BUFFERPOOLS} ALL","FLUSH EVENT MONITOR","FLUSH FEDERATED CACHE","FLUSH OPTIMIZATION PROFILE CACHE","FLUSH PACKAGE CACHE [DYNAMIC]","FLUSH AUTHENTICATION CACHE [FOR ALL]","FREE LOCATOR","GET DIAGNOSTICS","GOTO","GRANT","INCLUDE","ITERATE","LEAVE","LOCK TABLE","LOOP","OPEN","PIPE","PREPARE","REFRESH TABLE","RELEASE","RELEASE [TO] SAVEPOINT","RENAME [TABLE | INDEX | STOGROUP | TABLESPACE]","REPEAT","RESIGNAL","RETURN","REVOKE","ROLLBACK [WORK] [TO SAVEPOINT]","SAVEPOINT","SET COMPILATION ENVIRONMENT","SET CONNECTION","SET CURRENT","SET ENCRYPTION PASSWORD","SET EVENT MONITOR STATE","SET INTEGRITY","SET PASSTHRU","SET PATH","SET ROLE","SET SCHEMA","SET SERVER OPTION","SET {SESSION AUTHORIZATION | SESSION_USER}","SET USAGE LIST","SIGNAL","TRANSFER OWNERSHIP OF","WHENEVER {NOT FOUND | SQLERROR | SQLWARNING}","WHILE"]),Ms=v(["UNION [ALL]","EXCEPT [ALL]","INTERSECT [ALL]"]),Us=v(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN"]),ms=v(["ON DELETE","ON UPDATE","SET NULL","{ROWS | RANGE} BETWEEN"]),hs={name:"db2",tokenizerOptions:{reservedSelect:ds,reservedClauses:[...ps,...Tr,...$t],reservedSetOperations:Ms,reservedJoins:Us,reservedPhrases:ms,reservedKeywords:Ps,reservedDataTypes:Ds,reservedFunctionNames:fs,extraParens:["[]"],stringTypes:[{quote:"''-qq",prefixes:["G","N","U&"]},{quote:"''-raw",prefixes:["X","BX","GX","UX"],requirePrefix:!0}],identTypes:['""-qq'],identChars:{first:"@#$",rest:"@#$"},paramTypes:{positional:!0,named:[":"]},paramChars:{first:"@#$",rest:"@#$"},operators:["**","%","|","&","^","~","¬=","¬>","¬<","!>","!<","^=","^>","^<","||","->","=>"]},formatOptions:{onelineClauses:[...Tr,...$t],tabularOnelineClauses:$t}},Gs=["ARRAY_AGG","AVG","CORR","CORRELATION","COUNT","COUNT_BIG","COVAR_POP","COVARIANCE","COVAR","COVAR_SAMP","COVARIANCE_SAMP","EVERY","GROUPING","JSON_ARRAYAGG","JSON_OBJECTAGG","LISTAGG","MAX","MEDIAN","MIN","PERCENTILE_CONT","PERCENTILE_DISC","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","SOME","STDDEV_POP","STDDEV","STDDEV_SAMP","SUM","VAR_POP","VARIANCE","VAR","VAR_SAMP","VARIANCE_SAMP","XMLAGG","XMLGROUP","ABS","ABSVAL","ACOS","ADD_DAYS","ADD_HOURS","ADD_MINUTES","ADD_MONTHS","ADD_SECONDS","ADD_YEARS","ANTILOG","ARRAY_MAX_CARDINALITY","ARRAY_TRIM","ASCII","ASIN","ATAN","ATAN2","ATANH","BASE64_DECODE","BASE64_ENCODE","BIT_LENGTH","BITAND","BITANDNOT","BITNOT","BITOR","BITXOR","BSON_TO_JSON","CARDINALITY","CEIL","CEILING","CHAR_LENGTH","CHARACTER_LENGTH","CHR","COALESCE","COMPARE_DECFLOAT","CONCAT","CONTAINS","COS","COSH","COT","CURDATE","CURTIME","DATABASE","DATAPARTITIONNAME","DATAPARTITIONNUM","DAY","DAYNAME","DAYOFMONTH","DAYOFWEEK_ISO","DAYOFWEEK","DAYOFYEAR","DAYS","DBPARTITIONNAME","DBPARTITIONNUM","DECFLOAT_FORMAT","DECFLOAT_SORTKEY","DECRYPT_BINARY","DECRYPT_BIT","DECRYPT_CHAR","DECRYPT_DB","DEGREES","DIFFERENCE","DIGITS","DLCOMMENT","DLLINKTYPE","DLURLCOMPLETE","DLURLPATH","DLURLPATHONLY","DLURLSCHEME","DLURLSERVER","DLVALUE","DOUBLE_PRECISION","DOUBLE","ENCRPYT","ENCRYPT_AES","ENCRYPT_AES256","ENCRYPT_RC2","ENCRYPT_TDES","EXP","EXTRACT","FIRST_DAY","FLOOR","GENERATE_UNIQUE","GET_BLOB_FROM_FILE","GET_CLOB_FROM_FILE","GET_DBCLOB_FROM_FILE","GET_XML_FILE","GETHINT","GREATEST","HASH_MD5","HASH_ROW","HASH_SHA1","HASH_SHA256","HASH_SHA512","HASH_VALUES","HASHED_VALUE","HEX","HEXTORAW","HOUR","HTML_ENTITY_DECODE","HTML_ENTITY_ENCODE","HTTP_DELETE_BLOB","HTTP_DELETE","HTTP_GET_BLOB","HTTP_GET","HTTP_PATCH_BLOB","HTTP_PATCH","HTTP_POST_BLOB","HTTP_POST","HTTP_PUT_BLOB","HTTP_PUT","IDENTITY_VAL_LOCAL","IFNULL","INSERT","INSTR","INTERPRET","ISFALSE","ISNOTFALSE","ISNOTTRUE","ISTRUE","JSON_ARRAY","JSON_OBJECT","JSON_QUERY","JSON_TO_BSON","JSON_UPDATE","JSON_VALUE","JULIAN_DAY","LAND","LAST_DAY","LCASE","LEAST","LEFT","LENGTH","LN","LNOT","LOCATE_IN_STRING","LOCATE","LOG10","LOR","LOWER","LPAD","LTRIM","MAX_CARDINALITY","MAX","MICROSECOND","MIDNIGHT_SECONDS","MIN","MINUTE","MOD","MONTH","MONTHNAME","MONTHS_BETWEEN","MQREAD","MQREADCLOB","MQRECEIVE","MQRECEIVECLOB","MQSEND","MULTIPLY_ALT","NEXT_DAY","NORMALIZE_DECFLOAT","NOW","NULLIF","NVL","OCTET_LENGTH","OVERLAY","PI","POSITION","POSSTR","POW","POWER","QUANTIZE","QUARTER","RADIANS","RAISE_ERROR","RANDOM","RAND","REGEXP_COUNT","REGEXP_INSTR","REGEXP_REPLACE","REGEXP_SUBSTR","REPEAT","REPLACE","RID","RIGHT","ROUND_TIMESTAMP","ROUND","RPAD","RRN","RTRIM","SCORE","SECOND","SIGN","SIN","SINH","SOUNDEX","SPACE","SQRT","STRIP","STRLEFT","STRPOS","STRRIGHT","SUBSTR","SUBSTRING","TABLE_NAME","TABLE_SCHEMA","TAN","TANH","TIMESTAMP_FORMAT","TIMESTAMP_ISO","TIMESTAMPDIFF_BIG","TIMESTAMPDIFF","TO_CHAR","TO_CLOB","TO_DATE","TO_NUMBER","TO_TIMESTAMP","TOTALORDER","TRANSLATE","TRIM_ARRAY","TRIM","TRUNC_TIMESTAMP","TRUNC","TRUNCATE","UCASE","UPPER","URL_DECODE","URL_ENCODE","VALUE","VARBINARY_FORMAT","VARCHAR_BIT_FORMAT","VARCHAR_FORMAT_BINARY","VARCHAR_FORMAT","VERIFY_GROUP_FOR_USER","WEEK_ISO","WEEK","WRAP","XMLATTRIBUTES","XMLCOMMENT","XMLCONCAT","XMLDOCUMENT","XMLELEMENT","XMLFOREST","XMLNAMESPACES","XMLPARSE","XMLPI","XMLROW","XMLSERIALIZE","XMLTEXT","XMLVALIDATE","XOR","XSLTRANSFORM","YEAR","ZONED","BASE_TABLE","HTTP_DELETE_BLOB_VERBOSE","HTTP_DELETE_VERBOSE","HTTP_GET_BLOB_VERBOSE","HTTP_GET_VERBOSE","HTTP_PATCH_BLOB_VERBOSE","HTTP_PATCH_VERBOSE","HTTP_POST_BLOB_VERBOSE","HTTP_POST_VERBOSE","HTTP_PUT_BLOB_VERBOSE","HTTP_PUT_VERBOSE","JSON_TABLE","MQREADALL","MQREADALLCLOB","MQRECEIVEALL","MQRECEIVEALLCLOB","XMLTABLE","UNPACK","CUME_DIST","DENSE_RANK","FIRST_VALUE","LAG","LAST_VALUE","LEAD","NTH_VALUE","NTILE","PERCENT_RANK","RANK","RATIO_TO_REPORT","ROW_NUMBER","CAST"],gs=["ABSENT","ACCORDING","ACCTNG","ACTION","ACTIVATE","ADD","ALIAS","ALL","ALLOCATE","ALLOW","ALTER","AND","ANY","APPEND","APPLNAME","ARRAY","ARRAY_AGG","ARRAY_TRIM","AS","ASC","ASENSITIVE","ASSOCIATE","ATOMIC","ATTACH","ATTRIBUTES","AUTHORIZATION","AUTONOMOUS","BEFORE","BEGIN","BETWEEN","BIND","BSON","BUFFERPOOL","BY","CACHE","CALL","CALLED","CARDINALITY","CASE","CAST","CHECK","CL","CLOSE","CLUSTER","COLLECT","COLLECTION","COLUMN","COMMENT","COMMIT","COMPACT","COMPARISONS","COMPRESS","CONCAT","CONCURRENT","CONDITION","CONNECT","CONNECT_BY_ROOT","CONNECTION","CONSTANT","CONSTRAINT","CONTAINS","CONTENT","CONTINUE","COPY","COUNT","COUNT_BIG","CREATE","CREATEIN","CROSS","CUBE","CUME_DIST","CURRENT","CURRENT_DATE","CURRENT_PATH","CURRENT_SCHEMA","CURRENT_SERVER","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","CURRENT_USER","CURSOR","CYCLE","DATABASE","DATAPARTITIONNAME","DATAPARTITIONNUM","DAY","DAYS","DB2GENERAL","DB2GENRL","DB2SQL","DBINFO","DBPARTITIONNAME","DBPARTITIONNUM","DEACTIVATE","DEALLOCATE","DECLARE","DEFAULT","DEFAULTS","DEFER","DEFINE","DEFINITION","DELETE","DELETING","DENSE_RANK","DENSERANK","DESC","DESCRIBE","DESCRIPTOR","DETACH","DETERMINISTIC","DIAGNOSTICS","DISABLE","DISALLOW","DISCONNECT","DISTINCT","DO","DOCUMENT","DROP","DYNAMIC","EACH","ELSE","ELSEIF","EMPTY","ENABLE","ENCODING","ENCRYPTION","END","END-EXEC","ENDING","ENFORCED","ERROR","ESCAPE","EVERY","EXCEPT","EXCEPTION","EXCLUDING","EXCLUSIVE","EXECUTE","EXISTS","EXIT","EXTEND","EXTERNAL","EXTRACT","FALSE","FENCED","FETCH","FIELDPROC","FILE","FINAL","FIRST_VALUE","FOR","FOREIGN","FORMAT","FREE","FREEPAGE","FROM","FULL","FUNCTION","GBPCACHE","GENERAL","GENERATED","GET","GLOBAL","GO","GOTO","GRANT","GROUP","HANDLER","HASH","HASH_ROW","HASHED_VALUE","HAVING","HINT","HOLD","HOUR","HOURS","IDENTITY","IF","IGNORE","IMMEDIATE","IMPLICITLY","IN","INCLUDE","INCLUDING","INCLUSIVE","INCREMENT","INDEX","INDEXBP","INDICATOR","INF","INFINITY","INHERIT","INLINE","INNER","INOUT","INSENSITIVE","INSERT","INSERTING","INTEGRITY","INTERPRET","INTERSECT","INTO","IS","ISNULL","ISOLATION","ITERATE","JAVA","JOIN","JSON","JSON_ARRAY","JSON_ARRAYAGG","JSON_EXISTS","JSON_OBJECT","JSON_OBJECTAGG","JSON_QUERY","JSON_TABLE","JSON_VALUE","KEEP","KEY","KEYS","LABEL","LAG","LANGUAGE","LAST_VALUE","LATERAL","LEAD","LEAVE","LEFT","LEVEL2","LIKE","LIMIT","LINKTYPE","LISTAGG","LOCAL","LOCALDATE","LOCALTIME","LOCALTIMESTAMP","LOCATION","LOCATOR","LOCK","LOCKSIZE","LOG","LOGGED","LOOP","MAINTAINED","MASK","MATCHED","MATERIALIZED","MAXVALUE","MERGE","MICROSECOND","MICROSECONDS","MINPCTUSED","MINUTE","MINUTES","MINVALUE","MIRROR","MIXED","MODE","MODIFIES","MONTH","MONTHS","NAMESPACE","NAN","NATIONAL","NCHAR","NCLOB","NESTED","NEW","NEW_TABLE","NEXTVAL","NO","NOCACHE","NOCYCLE","NODENAME","NODENUMBER","NOMAXVALUE","NOMINVALUE","NONE","NOORDER","NORMALIZED","NOT","NOTNULL","NTH_VALUE","NTILE","NULL","NULLS","NVARCHAR","OBID","OBJECT","OF","OFF","OFFSET","OLD","OLD_TABLE","OMIT","ON","ONLY","OPEN","OPTIMIZE","OPTION","OR","ORDER","ORDINALITY","ORGANIZE","OUT","OUTER","OVER","OVERLAY","OVERRIDING","PACKAGE","PADDED","PAGE","PAGESIZE","PARAMETER","PART","PARTITION","PARTITIONED","PARTITIONING","PARTITIONS","PASSING","PASSWORD","PATH","PCTFREE","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","PERIOD","PERMISSION","PIECESIZE","PIPE","PLAN","POSITION","PREPARE","PREVVAL","PRIMARY","PRIOR","PRIQTY","PRIVILEGES","PROCEDURE","PROGRAM","PROGRAMID","QUERY","RANGE","RANK","RATIO_TO_REPORT","RCDFMT","READ","READS","RECOVERY","REFERENCES","REFERENCING","REFRESH","REGEXP_LIKE","RELEASE","RENAME","REPEAT","RESET","RESIGNAL","RESTART","RESULT","RESULT_SET_LOCATOR","RETURN","RETURNING","RETURNS","REVOKE","RID","RIGHT","ROLLBACK","ROLLUP","ROUTINE","ROW","ROW_NUMBER","ROWNUMBER","ROWS","RRN","RUN","SAVEPOINT","SBCS","SCALAR","SCHEMA","SCRATCHPAD","SCROLL","SEARCH","SECOND","SECONDS","SECQTY","SECURED","SELECT","SENSITIVE","SEQUENCE","SESSION","SESSION_USER","SET","SIGNAL","SIMPLE","SKIP","SNAN","SOME","SOURCE","SPECIFIC","SQL","SQLID","SQLIND_DEFAULT","SQLIND_UNASSIGNED","STACKED","START","STARTING","STATEMENT","STATIC","STOGROUP","SUBSTRING","SUMMARY","SYNONYM","SYSTEM_TIME","SYSTEM_USER","TABLE","TABLESPACE","TABLESPACES","TAG","THEN","THREADSAFE","TO","TRANSACTION","TRANSFER","TRIGGER","TRIM","TRIM_ARRAY","TRUE","TRUNCATE","TRY_CAST","TYPE","UNDO","UNION","UNIQUE","UNIT","UNKNOWN","UNNEST","UNTIL","UPDATE","UPDATING","URI","USAGE","USE","USER","USERID","USING","VALUE","VALUES","VARIABLE","VARIANT","VCAT","VERSION","VERSIONING","VIEW","VOLATILE","WAIT","WHEN","WHENEVER","WHERE","WHILE","WITH","WITHIN","WITHOUT","WRAPPED","WRAPPER","WRITE","WRKSTNNAME","XMLAGG","XMLATTRIBUTES","XMLCAST","XMLCOMMENT","XMLCONCAT","XMLDOCUMENT","XMLELEMENT","XMLFOREST","XMLGROUP","XMLNAMESPACES","XMLPARSE","XMLPI","XMLROW","XMLSERIALIZE","XMLTABLE","XMLTEXT","XMLVALIDATE","XSLTRANSFORM","XSROBJECT","YEAR","YEARS","YES","ZONE"],Hs=["ARRAY","BIGINT","BINARY","BIT","BLOB","BOOLEAN","CCSID","CHAR","CHARACTER","CLOB","DATA","DATALINK","DATE","DBCLOB","DECFLOAT","DECIMAL","DEC","DOUBLE","DOUBLE PRECISION","FLOAT","GRAPHIC","INT","INTEGER","LONG","NUMERIC","REAL","ROWID","SMALLINT","TIME","TIMESTAMP","VARBINARY","VARCHAR","VARGRAPHIC","XML"],bs=v(["SELECT [ALL | DISTINCT]"]),ys=v(["WITH [RECURSIVE]","INTO","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER [SIBLINGS] BY [INPUT SEQUENCE]","LIMIT","OFFSET","FETCH {FIRST | NEXT}","FOR UPDATE [OF]","FOR READ ONLY","OPTIMIZE FOR","INSERT INTO","VALUES","SET","MERGE INTO","WHEN [NOT] MATCHED [THEN]","UPDATE SET","DELETE","INSERT","FOR SYSTEM NAME"]),rr=v(["CREATE [OR REPLACE] TABLE"]),Xt=v(["CREATE [OR REPLACE] [RECURSIVE] VIEW","UPDATE","WHERE CURRENT OF","WITH {NC | RR | RS | CS | UR}","DELETE FROM","DROP TABLE","ALTER TABLE","ADD [COLUMN]","ALTER [COLUMN]","DROP [COLUMN]","SET DATA TYPE","SET {GENERATED ALWAYS | GENERATED BY DEFAULT}","SET NOT NULL","SET {NOT HIDDEN | IMPLICITLY HIDDEN}","SET FIELDPROC","DROP {DEFAULT | NOT NULL | GENERATED | IDENTITY | ROW CHANGE TIMESTAMP | FIELDPROC}","TRUNCATE [TABLE]","SET [CURRENT] SCHEMA","SET CURRENT_SCHEMA","ALLOCATE CURSOR","ALLOCATE [SQL] DESCRIPTOR [LOCAL | GLOBAL] SQL","ALTER [SPECIFIC] {FUNCTION | PROCEDURE}","ALTER {MASK | PERMISSION | SEQUENCE | TRIGGER}","ASSOCIATE [RESULT SET] {LOCATOR | LOCATORS}","BEGIN DECLARE SECTION","CALL","CLOSE","COMMENT ON {ALIAS | COLUMN | CONSTRAINT | INDEX | MASK | PACKAGE | PARAMETER | PERMISSION | SEQUENCE | TABLE | TRIGGER | VARIABLE | XSROBJECT}","COMMENT ON [SPECIFIC] {FUNCTION | PROCEDURE | ROUTINE}","COMMENT ON PARAMETER SPECIFIC {FUNCTION | PROCEDURE | ROUTINE}","COMMENT ON [TABLE FUNCTION] RETURN COLUMN","COMMENT ON [TABLE FUNCTION] RETURN COLUMN SPECIFIC [PROCEDURE | ROUTINE]","COMMIT [WORK] [HOLD]","CONNECT [TO | RESET] USER","CREATE [OR REPLACE] {ALIAS | FUNCTION | MASK | PERMISSION | PROCEDURE | SEQUENCE | TRIGGER | VARIABLE}","CREATE [ENCODED VECTOR] INDEX","CREATE UNIQUE [WHERE NOT NULL] INDEX","CREATE SCHEMA","CREATE TYPE","DEALLOCATE [SQL] DESCRIPTOR [LOCAL | GLOBAL]","DECLARE CURSOR","DECLARE GLOBAL TEMPORARY TABLE","DECLARE","DESCRIBE CURSOR","DESCRIBE INPUT","DESCRIBE [OUTPUT]","DESCRIBE {PROCEDURE | ROUTINE}","DESCRIBE TABLE","DISCONNECT ALL [SQL]","DISCONNECT [CURRENT]","DROP {ALIAS | INDEX | MASK | PACKAGE | PERMISSION | SCHEMA | SEQUENCE | TABLE | TYPE | VARIABLE | XSROBJECT} [IF EXISTS]","DROP [SPECIFIC] {FUNCTION | PROCEDURE | ROUTINE} [IF EXISTS]","END DECLARE SECTION","EXECUTE [IMMEDIATE]","FREE LOCATOR","GET [SQL] DESCRIPTOR [LOCAL | GLOBAL]","GET [CURRENT | STACKED] DIAGNOSTICS","GRANT {ALL [PRIVILEGES] | ALTER | EXECUTE} ON {FUNCTION | PROCEDURE | ROUTINE | PACKAGE | SCHEMA | SEQUENCE | TABLE | TYPE | VARIABLE | XSROBJECT}","HOLD LOCATOR","INCLUDE","LABEL ON {ALIAS | COLUMN | CONSTRAINT | INDEX | MASK | PACKAGE | PERMISSION | SEQUENCE | TABLE | TRIGGER | VARIABLE | XSROBJECT}","LABEL ON [SPECIFIC] {FUNCTION | PROCEDURE | ROUTINE}","LOCK TABLE","OPEN","PREPARE","REFRESH TABLE","RELEASE","RELEASE [TO] SAVEPOINT","RENAME [TABLE | INDEX] TO","REVOKE {ALL [PRIVILEGES] | ALTER | EXECUTE} ON {FUNCTION | PROCEDURE | ROUTINE | PACKAGE | SCHEMA | SEQUENCE | TABLE | TYPE | VARIABLE | XSROBJECT}","ROLLBACK [WORK] [HOLD | TO SAVEPOINT]","SAVEPOINT","SET CONNECTION","SET CURRENT {DEBUG MODE | DECFLOAT ROUNDING MODE | DEGREE | IMPLICIT XMLPARSE OPTION | TEMPORAL SYSTEM_TIME}","SET [SQL] DESCRIPTOR [LOCAL | GLOBAL]","SET ENCRYPTION PASSWORD","SET OPTION","SET {[CURRENT [FUNCTION]] PATH | CURRENT_PATH}","SET RESULT SETS [WITH RETURN [TO CALLER | TO CLIENT]]","SET SESSION AUTHORIZATION","SET SESSION_USER","SET TRANSACTION","SIGNAL SQLSTATE [VALUE]","TAG","TRANSFER OWNERSHIP OF","WHENEVER {NOT FOUND | SQLERROR | SQLWARNING}"]),Bs=v(["UNION [ALL]","EXCEPT [ALL]","INTERSECT [ALL]"]),vs=v(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","[LEFT | RIGHT] EXCEPTION JOIN","{INNER | CROSS} JOIN"]),Fs=v(["ON DELETE","ON UPDATE","SET NULL","{ROWS | RANGE} BETWEEN"]),Ys={name:"db2i",tokenizerOptions:{reservedSelect:bs,reservedClauses:[...ys,...rr,...Xt],reservedSetOperations:Bs,reservedJoins:vs,reservedPhrases:Fs,reservedKeywords:gs,reservedDataTypes:Hs,reservedFunctionNames:Gs,nestedBlockComments:!0,extraParens:["[]"],stringTypes:[{quote:"''-qq",prefixes:["G","N"]},{quote:"''-raw",prefixes:["X","BX","GX","UX"],requirePrefix:!0}],identTypes:['""-qq'],identChars:{first:"@#$",rest:"@#$"},paramTypes:{positional:!0,named:[":"]},paramChars:{first:"@#$",rest:"@#$"},operators:["**","¬=","¬>","¬<","!>","!<","||","=>"]},formatOptions:{onelineClauses:[...rr,...Xt],tabularOnelineClauses:Xt}},Vs=["ABS","ACOS","ASIN","ATAN","BIN","BROUND","CBRT","CEIL","CEILING","CONV","COS","DEGREES","EXP","FACTORIAL","FLOOR","GREATEST","HEX","LEAST","LN","LOG","LOG10","LOG2","NEGATIVE","PI","PMOD","POSITIVE","POW","POWER","RADIANS","RAND","ROUND","SHIFTLEFT","SHIFTRIGHT","SHIFTRIGHTUNSIGNED","SIGN","SIN","SQRT","TAN","UNHEX","WIDTH_BUCKET","ARRAY_CONTAINS","MAP_KEYS","MAP_VALUES","SIZE","SORT_ARRAY","BINARY","CAST","ADD_MONTHS","DATE","DATE_ADD","DATE_FORMAT","DATE_SUB","DATEDIFF","DAY","DAYNAME","DAYOFMONTH","DAYOFYEAR","EXTRACT","FROM_UNIXTIME","FROM_UTC_TIMESTAMP","HOUR","LAST_DAY","MINUTE","MONTH","MONTHS_BETWEEN","NEXT_DAY","QUARTER","SECOND","TIMESTAMP","TO_DATE","TO_UTC_TIMESTAMP","TRUNC","UNIX_TIMESTAMP","WEEKOFYEAR","YEAR","ASSERT_TRUE","COALESCE","IF","ISNOTNULL","ISNULL","NULLIF","NVL","ASCII","BASE64","CHARACTER_LENGTH","CHR","CONCAT","CONCAT_WS","CONTEXT_NGRAMS","DECODE","ELT","ENCODE","FIELD","FIND_IN_SET","FORMAT_NUMBER","GET_JSON_OBJECT","IN_FILE","INITCAP","INSTR","LCASE","LENGTH","LEVENSHTEIN","LOCATE","LOWER","LPAD","LTRIM","NGRAMS","OCTET_LENGTH","PARSE_URL","PRINTF","QUOTE","REGEXP_EXTRACT","REGEXP_REPLACE","REPEAT","REVERSE","RPAD","RTRIM","SENTENCES","SOUNDEX","SPACE","SPLIT","STR_TO_MAP","SUBSTR","SUBSTRING","TRANSLATE","TRIM","UCASE","UNBASE64","UPPER","MASK","MASK_FIRST_N","MASK_HASH","MASK_LAST_N","MASK_SHOW_FIRST_N","MASK_SHOW_LAST_N","AES_DECRYPT","AES_ENCRYPT","CRC32","CURRENT_DATABASE","CURRENT_USER","HASH","JAVA_METHOD","LOGGED_IN_USER","MD5","REFLECT","SHA","SHA1","SHA2","SURROGATE_KEY","VERSION","AVG","COLLECT_LIST","COLLECT_SET","CORR","COUNT","COVAR_POP","COVAR_SAMP","HISTOGRAM_NUMERIC","MAX","MIN","NTILE","PERCENTILE","PERCENTILE_APPROX","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","STDDEV_POP","STDDEV_SAMP","SUM","VAR_POP","VAR_SAMP","VARIANCE","EXPLODE","INLINE","JSON_TUPLE","PARSE_URL_TUPLE","POSEXPLODE","STACK","LEAD","LAG","FIRST_VALUE","LAST_VALUE","RANK","ROW_NUMBER","DENSE_RANK","CUME_DIST","PERCENT_RANK","NTILE"],Ws=["ADD","ADMIN","AFTER","ANALYZE","ARCHIVE","ASC","BEFORE","BUCKET","BUCKETS","CASCADE","CHANGE","CLUSTER","CLUSTERED","CLUSTERSTATUS","COLLECTION","COLUMNS","COMMENT","COMPACT","COMPACTIONS","COMPUTE","CONCATENATE","CONTINUE","DATA","DATABASES","DATETIME","DAY","DBPROPERTIES","DEFERRED","DEFINED","DELIMITED","DEPENDENCY","DESC","DIRECTORIES","DIRECTORY","DISABLE","DISTRIBUTE","ELEM_TYPE","ENABLE","ESCAPED","EXCLUSIVE","EXPLAIN","EXPORT","FIELDS","FILE","FILEFORMAT","FIRST","FORMAT","FORMATTED","FUNCTIONS","HOLD_DDLTIME","HOUR","IDXPROPERTIES","IGNORE","INDEX","INDEXES","INPATH","INPUTDRIVER","INPUTFORMAT","ITEMS","JAR","KEYS","KEY_TYPE","LIMIT","LINES","LOAD","LOCATION","LOCK","LOCKS","LOGICAL","LONG","MAPJOIN","MATERIALIZED","METADATA","MINUS","MINUTE","MONTH","MSCK","NOSCAN","NO_DROP","OFFLINE","OPTION","OUTPUTDRIVER","OUTPUTFORMAT","OVERWRITE","OWNER","PARTITIONED","PARTITIONS","PLUS","PRETTY","PRINCIPALS","PROTECTION","PURGE","READ","READONLY","REBUILD","RECORDREADER","RECORDWRITER","RELOAD","RENAME","REPAIR","REPLACE","REPLICATION","RESTRICT","REWRITE","ROLE","ROLES","SCHEMA","SCHEMAS","SECOND","SEMI","SERDE","SERDEPROPERTIES","SERVER","SETS","SHARED","SHOW","SHOW_DATABASE","SKEWED","SORT","SORTED","SSL","STATISTICS","STORED","STREAMTABLE","STRING","TABLES","TBLPROPERTIES","TEMPORARY","TERMINATED","TINYINT","TOUCH","TRANSACTIONS","UNARCHIVE","UNDO","UNIONTYPE","UNLOCK","UNSET","UNSIGNED","URI","USE","UTC","UTCTIMESTAMP","VALUE_TYPE","VIEW","WHILE","YEAR","AUTOCOMMIT","ISOLATION","LEVEL","OFFSET","SNAPSHOT","TRANSACTION","WORK","WRITE","ABORT","KEY","LAST","NORELY","NOVALIDATE","NULLS","RELY","VALIDATE","DETAIL","DOW","EXPRESSION","OPERATOR","QUARTER","SUMMARY","VECTORIZATION","WEEK","YEARS","MONTHS","WEEKS","DAYS","HOURS","MINUTES","SECONDS","TIMESTAMPTZ","ZONE","ALL","ALTER","AND","AS","AUTHORIZATION","BETWEEN","BOTH","BY","CASE","CAST","COLUMN","CONF","CREATE","CROSS","CUBE","CURRENT","CURRENT_DATE","CURRENT_TIMESTAMP","CURSOR","DATABASE","DELETE","DESCRIBE","DISTINCT","DROP","ELSE","END","EXCHANGE","EXISTS","EXTENDED","EXTERNAL","FALSE","FETCH","FOLLOWING","FOR","FROM","FULL","FUNCTION","GRANT","GROUP","GROUPING","HAVING","IF","IMPORT","IN","INNER","INSERT","INTERSECT","INTO","IS","JOIN","LATERAL","LEFT","LESS","LIKE","LOCAL","MACRO","MORE","NONE","NOT","NULL","OF","ON","OR","ORDER","OUT","OUTER","OVER","PARTIALSCAN","PARTITION","PERCENT","PRECEDING","PRESERVE","PROCEDURE","RANGE","READS","REDUCE","REVOKE","RIGHT","ROLLUP","ROW","ROWS","SELECT","SET","TABLE","TABLESAMPLE","THEN","TO","TRANSFORM","TRIGGER","TRUE","TRUNCATE","UNBOUNDED","UNION","UNIQUEJOIN","UPDATE","USER","USING","UTC_TMESTAMP","VALUES","WHEN","WHERE","WINDOW","WITH","COMMIT","ONLY","REGEXP","RLIKE","ROLLBACK","START","CACHE","CONSTRAINT","FOREIGN","PRIMARY","REFERENCES","DAYOFWEEK","EXTRACT","FLOOR","VIEWS","TIME","SYNC","TEXTFILE","SEQUENCEFILE","ORC","CSV","TSV","PARQUET","AVRO","RCFILE","JSONFILE","INPUTFORMAT","OUTPUTFORMAT"],ws=["ARRAY","BIGINT","BINARY","BOOLEAN","CHAR","DATE","DECIMAL","DOUBLE","FLOAT","INT","INTEGER","INTERVAL","MAP","NUMERIC","PRECISION","SMALLINT","STRUCT","TIMESTAMP","VARCHAR"],xs=v(["SELECT [ALL | DISTINCT]"]),$s=v(["WITH","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","SORT BY","CLUSTER BY","DISTRIBUTE BY","LIMIT","INSERT INTO [TABLE]","VALUES","SET","MERGE INTO","WHEN [NOT] MATCHED [THEN]","UPDATE SET","INSERT [VALUES]","INSERT OVERWRITE [LOCAL] DIRECTORY","LOAD DATA [LOCAL] INPATH","[OVERWRITE] INTO TABLE"]),Rr=v(["CREATE [TEMPORARY] [EXTERNAL] TABLE [IF NOT EXISTS]"]),kt=v(["CREATE [MATERIALIZED] VIEW [IF NOT EXISTS]","UPDATE","DELETE FROM","DROP TABLE [IF EXISTS]","ALTER TABLE","RENAME TO","TRUNCATE [TABLE]","ALTER","CREATE","USE","DESCRIBE","DROP","FETCH","SHOW","STORED AS","STORED BY","ROW FORMAT"]),Xs=v(["UNION [ALL | DISTINCT]"]),ks=v(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","LEFT SEMI JOIN"]),Ks=v(["{ROWS | RANGE} BETWEEN"]),Js={name:"hive",tokenizerOptions:{reservedSelect:xs,reservedClauses:[...$s,...Rr,...kt],reservedSetOperations:Xs,reservedJoins:ks,reservedPhrases:Ks,reservedKeywords:Ws,reservedDataTypes:ws,reservedFunctionNames:Vs,extraParens:["[]"],stringTypes:['""-bs',"''-bs"],identTypes:["``"],variableTypes:[{quote:"{}",prefixes:["$"],requirePrefix:!0}],operators:["%","~","^","|","&","<=>","==","!","||"]},formatOptions:{onelineClauses:[...Rr,...kt],tabularOnelineClauses:kt}};function bt(E){return E.map((e,T)=>{const t=E[T+1]||et;if(vE.SET(e)&&t.text==="(")return AE(eE({},e),{type:"RESERVED_FUNCTION_NAME"});const r=E[T-1]||et;return vE.VALUES(e)&&r.text==="="?AE(eE({},e),{type:"RESERVED_FUNCTION_NAME"}):e})}var qs=["ACCESSIBLE","ADD","ALL","ALTER","ANALYZE","AND","AS","ASC","ASENSITIVE","BEFORE","BETWEEN","BOTH","BY","CALL","CASCADE","CASE","CHANGE","CHECK","COLLATE","COLUMN","CONDITION","CONSTRAINT","CONTINUE","CONVERT","CREATE","CROSS","CURRENT_DATE","CURRENT_ROLE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DATABASES","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DECLARE","DEFAULT","DELAYED","DELETE","DELETE_DOMAIN_ID","DESC","DESCRIBE","DETERMINISTIC","DISTINCT","DISTINCTROW","DIV","DO_DOMAIN_IDS","DROP","DUAL","EACH","ELSE","ELSEIF","ENCLOSED","ESCAPED","EXCEPT","EXISTS","EXIT","EXPLAIN","FALSE","FETCH","FOR","FORCE","FOREIGN","FROM","FULLTEXT","GENERAL","GRANT","GROUP","HAVING","HIGH_PRIORITY","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IF","IGNORE","IGNORE_DOMAIN_IDS","IGNORE_SERVER_IDS","IN","INDEX","INFILE","INNER","INOUT","INSENSITIVE","INSERT","INTERSECT","INTERVAL","INTO","IS","ITERATE","JOIN","KEY","KEYS","KILL","LEADING","LEAVE","LEFT","LIKE","LIMIT","LINEAR","LINES","LOAD","LOCALTIME","LOCALTIMESTAMP","LOCK","LOOP","LOW_PRIORITY","MASTER_HEARTBEAT_PERIOD","MASTER_SSL_VERIFY_SERVER_CERT","MATCH","MAXVALUE","MINUTE_MICROSECOND","MINUTE_SECOND","MOD","MODIFIES","NATURAL","NOT","NO_WRITE_TO_BINLOG","NULL","OFFSET","ON","OPTIMIZE","OPTION","OPTIONALLY","OR","ORDER","OUT","OUTER","OUTFILE","OVER","PAGE_CHECKSUM","PARSE_VCOL_EXPR","PARTITION","POSITION","PRIMARY","PROCEDURE","PURGE","RANGE","READ","READS","READ_WRITE","RECURSIVE","REF_SYSTEM_ID","REFERENCES","REGEXP","RELEASE","RENAME","REPEAT","REPLACE","REQUIRE","RESIGNAL","RESTRICT","RETURN","RETURNING","REVOKE","RIGHT","RLIKE","ROW_NUMBER","ROWS","SCHEMA","SCHEMAS","SECOND_MICROSECOND","SELECT","SENSITIVE","SEPARATOR","SET","SHOW","SIGNAL","SLOW","SPATIAL","SPECIFIC","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","SQL_BIG_RESULT","SQL_CALC_FOUND_ROWS","SQL_SMALL_RESULT","SSL","STARTING","STATS_AUTO_RECALC","STATS_PERSISTENT","STATS_SAMPLE_PAGES","STRAIGHT_JOIN","TABLE","TERMINATED","THEN","TO","TRAILING","TRIGGER","TRUE","UNDO","UNION","UNIQUE","UNLOCK","UNSIGNED","UPDATE","USAGE","USE","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","VALUES","WHEN","WHERE","WHILE","WINDOW","WITH","WRITE","XOR","YEAR_MONTH","ZEROFILL"],Qs=["BIGINT","BINARY","BIT","BLOB","CHAR BYTE","CHAR","CHARACTER","DATETIME","DEC","DECIMAL","DOUBLE PRECISION","DOUBLE","ENUM","FIXED","FLOAT","FLOAT4","FLOAT8","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","LONG","LONGBLOB","LONGTEXT","MEDIUMBLOB","MEDIUMINT","MEDIUMTEXT","MIDDLEINT","NATIONAL CHAR","NATIONAL VARCHAR","NUMERIC","PRECISION","REAL","SMALLINT","TEXT","TIMESTAMP","TINYBLOB","TINYINT","TINYTEXT","VARBINARY","VARCHAR","VARCHARACTER","VARYING","YEAR"],Zs=["ADDDATE","ADD_MONTHS","BIT_AND","BIT_OR","BIT_XOR","CAST","COUNT","CUME_DIST","CURDATE","CURTIME","DATE_ADD","DATE_SUB","DATE_FORMAT","DECODE","DENSE_RANK","EXTRACT","FIRST_VALUE","GROUP_CONCAT","JSON_ARRAYAGG","JSON_OBJECTAGG","LAG","LEAD","MAX","MEDIAN","MID","MIN","NOW","NTH_VALUE","NTILE","POSITION","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","RANK","ROW_NUMBER","SESSION_USER","STD","STDDEV","STDDEV_POP","STDDEV_SAMP","SUBDATE","SUBSTR","SUBSTRING","SUM","SYSTEM_USER","TRIM","TRIM_ORACLE","VARIANCE","VAR_POP","VAR_SAMP","ABS","ACOS","ADDTIME","AES_DECRYPT","AES_ENCRYPT","ASIN","ATAN","ATAN2","BENCHMARK","BIN","BINLOG_GTID_POS","BIT_COUNT","BIT_LENGTH","CEIL","CEILING","CHARACTER_LENGTH","CHAR_LENGTH","CHR","COERCIBILITY","COLUMN_CHECK","COLUMN_EXISTS","COLUMN_LIST","COLUMN_JSON","COMPRESS","CONCAT","CONCAT_OPERATOR_ORACLE","CONCAT_WS","CONNECTION_ID","CONV","CONVERT_TZ","COS","COT","CRC32","DATEDIFF","DAYNAME","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","DEGREES","DECODE_HISTOGRAM","DECODE_ORACLE","DES_DECRYPT","DES_ENCRYPT","ELT","ENCODE","ENCRYPT","EXP","EXPORT_SET","EXTRACTVALUE","FIELD","FIND_IN_SET","FLOOR","FORMAT","FOUND_ROWS","FROM_BASE64","FROM_DAYS","FROM_UNIXTIME","GET_LOCK","GREATEST","HEX","IFNULL","INSTR","ISNULL","IS_FREE_LOCK","IS_USED_LOCK","JSON_ARRAY","JSON_ARRAY_APPEND","JSON_ARRAY_INSERT","JSON_COMPACT","JSON_CONTAINS","JSON_CONTAINS_PATH","JSON_DEPTH","JSON_DETAILED","JSON_EXISTS","JSON_EXTRACT","JSON_INSERT","JSON_KEYS","JSON_LENGTH","JSON_LOOSE","JSON_MERGE","JSON_MERGE_PATCH","JSON_MERGE_PRESERVE","JSON_QUERY","JSON_QUOTE","JSON_OBJECT","JSON_REMOVE","JSON_REPLACE","JSON_SET","JSON_SEARCH","JSON_TYPE","JSON_UNQUOTE","JSON_VALID","JSON_VALUE","LAST_DAY","LAST_INSERT_ID","LCASE","LEAST","LENGTH","LENGTHB","LN","LOAD_FILE","LOCATE","LOG","LOG10","LOG2","LOWER","LPAD","LPAD_ORACLE","LTRIM","LTRIM_ORACLE","MAKEDATE","MAKETIME","MAKE_SET","MASTER_GTID_WAIT","MASTER_POS_WAIT","MD5","MONTHNAME","NAME_CONST","NVL","NVL2","OCT","OCTET_LENGTH","ORD","PERIOD_ADD","PERIOD_DIFF","PI","POW","POWER","QUOTE","REGEXP_INSTR","REGEXP_REPLACE","REGEXP_SUBSTR","RADIANS","RAND","RELEASE_ALL_LOCKS","RELEASE_LOCK","REPLACE_ORACLE","REVERSE","ROUND","RPAD","RPAD_ORACLE","RTRIM","RTRIM_ORACLE","SEC_TO_TIME","SHA","SHA1","SHA2","SIGN","SIN","SLEEP","SOUNDEX","SPACE","SQRT","STRCMP","STR_TO_DATE","SUBSTR_ORACLE","SUBSTRING_INDEX","SUBTIME","SYS_GUID","TAN","TIMEDIFF","TIME_FORMAT","TIME_TO_SEC","TO_BASE64","TO_CHAR","TO_DAYS","TO_SECONDS","UCASE","UNCOMPRESS","UNCOMPRESSED_LENGTH","UNHEX","UNIX_TIMESTAMP","UPDATEXML","UPPER","UUID","UUID_SHORT","VERSION","WEEKDAY","WEEKOFYEAR","WSREP_LAST_WRITTEN_GTID","WSREP_LAST_SEEN_GTID","WSREP_SYNC_WAIT_UPTO_GTID","YEARWEEK","COALESCE","NULLIF"],js=v(["SELECT [ALL | DISTINCT | DISTINCTROW]"]),zs=v(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY","LIMIT","OFFSET","FETCH {FIRST | NEXT}","INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO]","REPLACE [LOW_PRIORITY | DELAYED] [INTO]","VALUES","ON DUPLICATE KEY UPDATE","SET","RETURNING"]),nr=v(["CREATE [OR REPLACE] [TEMPORARY] TABLE [IF NOT EXISTS]"]),Kt=v(["CREATE [OR REPLACE] [SQL SECURITY DEFINER | SQL SECURITY INVOKER] VIEW [IF NOT EXISTS]","UPDATE [LOW_PRIORITY] [IGNORE]","DELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM","DROP [TEMPORARY] TABLE [IF EXISTS]","ALTER [ONLINE] [IGNORE] TABLE [IF EXISTS]","ADD [COLUMN] [IF NOT EXISTS]","{CHANGE | MODIFY} [COLUMN] [IF EXISTS]","DROP [COLUMN] [IF EXISTS]","RENAME [TO]","RENAME COLUMN","ALTER [COLUMN]","{SET | DROP} DEFAULT","SET {VISIBLE | INVISIBLE}","TRUNCATE [TABLE]","ALTER DATABASE","ALTER DATABASE COMMENT","ALTER EVENT","ALTER FUNCTION","ALTER PROCEDURE","ALTER SCHEMA","ALTER SCHEMA COMMENT","ALTER SEQUENCE","ALTER SERVER","ALTER USER","ALTER VIEW","ANALYZE","ANALYZE TABLE","BACKUP LOCK","BACKUP STAGE","BACKUP UNLOCK","BEGIN","BINLOG","CACHE INDEX","CALL","CHANGE MASTER TO","CHECK TABLE","CHECK VIEW","CHECKSUM TABLE","COMMIT","CREATE AGGREGATE FUNCTION","CREATE DATABASE","CREATE EVENT","CREATE FUNCTION","CREATE INDEX","CREATE PROCEDURE","CREATE ROLE","CREATE SEQUENCE","CREATE SERVER","CREATE SPATIAL INDEX","CREATE TRIGGER","CREATE UNIQUE INDEX","CREATE USER","DEALLOCATE PREPARE","DESCRIBE","DROP DATABASE","DROP EVENT","DROP FUNCTION","DROP INDEX","DROP PREPARE","DROP PROCEDURE","DROP ROLE","DROP SEQUENCE","DROP SERVER","DROP TRIGGER","DROP USER","DROP VIEW","EXECUTE","EXPLAIN","FLUSH","GET DIAGNOSTICS","GET DIAGNOSTICS CONDITION","GRANT","HANDLER","HELP","INSTALL PLUGIN","INSTALL SONAME","KILL","LOAD DATA INFILE","LOAD INDEX INTO CACHE","LOAD XML INFILE","LOCK TABLE","OPTIMIZE TABLE","PREPARE","PURGE BINARY LOGS","PURGE MASTER LOGS","RELEASE SAVEPOINT","RENAME TABLE","RENAME USER","REPAIR TABLE","REPAIR VIEW","RESET MASTER","RESET QUERY CACHE","RESET REPLICA","RESET SLAVE","RESIGNAL","REVOKE","ROLLBACK","SAVEPOINT","SET CHARACTER SET","SET DEFAULT ROLE","SET GLOBAL TRANSACTION","SET NAMES","SET PASSWORD","SET ROLE","SET STATEMENT","SET TRANSACTION","SHOW","SHOW ALL REPLICAS STATUS","SHOW ALL SLAVES STATUS","SHOW AUTHORS","SHOW BINARY LOGS","SHOW BINLOG EVENTS","SHOW BINLOG STATUS","SHOW CHARACTER SET","SHOW CLIENT_STATISTICS","SHOW COLLATION","SHOW COLUMNS","SHOW CONTRIBUTORS","SHOW CREATE DATABASE","SHOW CREATE EVENT","SHOW CREATE FUNCTION","SHOW CREATE PACKAGE","SHOW CREATE PACKAGE BODY","SHOW CREATE PROCEDURE","SHOW CREATE SEQUENCE","SHOW CREATE TABLE","SHOW CREATE TRIGGER","SHOW CREATE USER","SHOW CREATE VIEW","SHOW DATABASES","SHOW ENGINE","SHOW ENGINE INNODB STATUS","SHOW ENGINES","SHOW ERRORS","SHOW EVENTS","SHOW EXPLAIN","SHOW FUNCTION CODE","SHOW FUNCTION STATUS","SHOW GRANTS","SHOW INDEX","SHOW INDEXES","SHOW INDEX_STATISTICS","SHOW KEYS","SHOW LOCALES","SHOW MASTER LOGS","SHOW MASTER STATUS","SHOW OPEN TABLES","SHOW PACKAGE BODY CODE","SHOW PACKAGE BODY STATUS","SHOW PACKAGE STATUS","SHOW PLUGINS","SHOW PLUGINS SONAME","SHOW PRIVILEGES","SHOW PROCEDURE CODE","SHOW PROCEDURE STATUS","SHOW PROCESSLIST","SHOW PROFILE","SHOW PROFILES","SHOW QUERY_RESPONSE_TIME","SHOW RELAYLOG EVENTS","SHOW REPLICA","SHOW REPLICA HOSTS","SHOW REPLICA STATUS","SHOW SCHEMAS","SHOW SLAVE","SHOW SLAVE HOSTS","SHOW SLAVE STATUS","SHOW STATUS","SHOW STORAGE ENGINES","SHOW TABLE STATUS","SHOW TABLES","SHOW TRIGGERS","SHOW USER_STATISTICS","SHOW VARIABLES","SHOW WARNINGS","SHOW WSREP_MEMBERSHIP","SHOW WSREP_STATUS","SHUTDOWN","SIGNAL","START ALL REPLICAS","START ALL SLAVES","START REPLICA","START SLAVE","START TRANSACTION","STOP ALL REPLICAS","STOP ALL SLAVES","STOP REPLICA","STOP SLAVE","UNINSTALL PLUGIN","UNINSTALL SONAME","UNLOCK TABLE","USE","XA BEGIN","XA COMMIT","XA END","XA PREPARE","XA RECOVER","XA ROLLBACK","XA START"]),eS=v(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]","MINUS [ALL | DISTINCT]"]),ES=v(["JOIN","{LEFT | RIGHT} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL JOIN","NATURAL {LEFT | RIGHT} [OUTER] JOIN","STRAIGHT_JOIN"]),tS=v(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","CHARACTER SET","{ROWS | RANGE} BETWEEN","IDENTIFIED BY"]),TS={name:"mariadb",tokenizerOptions:{reservedSelect:js,reservedClauses:[...zs,...nr,...Kt],reservedSetOperations:eS,reservedJoins:ES,reservedPhrases:tS,supportsXor:!0,reservedKeywords:qs,reservedDataTypes:Qs,reservedFunctionNames:Zs,stringTypes:['""-qq-bs',"''-qq-bs",{quote:"''-raw",prefixes:["B","X"],requirePrefix:!0}],identTypes:["``"],identChars:{first:"$",rest:"$",allowFirstCharNumber:!0},variableTypes:[{regex:"@@?[A-Za-z0-9_.$]+"},{quote:'""-qq-bs',prefixes:["@"],requirePrefix:!0},{quote:"''-qq-bs",prefixes:["@"],requirePrefix:!0},{quote:"``",prefixes:["@"],requirePrefix:!0}],paramTypes:{positional:!0},lineCommentTypes:["--","#"],operators:["%",":=","&","|","^","~","<<",">>","<=>","&&","||","!","*.*"],postProcess:bt},formatOptions:{onelineClauses:[...nr,...Kt],tabularOnelineClauses:Kt}},rS=["ACCESSIBLE","ADD","ALL","ALTER","ANALYZE","AND","AS","ASC","ASENSITIVE","BEFORE","BETWEEN","BOTH","BY","CALL","CASCADE","CASE","CHANGE","CHECK","COLLATE","COLUMN","CONDITION","CONSTRAINT","CONTINUE","CONVERT","CREATE","CROSS","CUBE","CUME_DIST","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DATABASES","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DECLARE","DEFAULT","DELAYED","DELETE","DENSE_RANK","DESC","DESCRIBE","DETERMINISTIC","DISTINCT","DISTINCTROW","DIV","DROP","DUAL","EACH","ELSE","ELSEIF","EMPTY","ENCLOSED","ESCAPED","EXCEPT","EXISTS","EXIT","EXPLAIN","FALSE","FETCH","FIRST_VALUE","FOR","FORCE","FOREIGN","FROM","FULLTEXT","FUNCTION","GENERATED","GET","GRANT","GROUP","GROUPING","GROUPS","HAVING","HIGH_PRIORITY","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IF","IGNORE","IN","INDEX","INFILE","INNER","INOUT","INSENSITIVE","INSERT","IN","INTERSECT","INTERVAL","INTO","IO_AFTER_GTIDS","IO_BEFORE_GTIDS","IS","ITERATE","JOIN","JSON_TABLE","KEY","KEYS","KILL","LAG","LAST_VALUE","LATERAL","LEAD","LEADING","LEAVE","LEFT","LIKE","LIMIT","LINEAR","LINES","LOAD","LOCALTIME","LOCALTIMESTAMP","LOCK","LONG","LOOP","LOW_PRIORITY","MASTER_BIND","MASTER_SSL_VERIFY_SERVER_CERT","MATCH","MAXVALUE","MINUTE_MICROSECOND","MINUTE_SECOND","MOD","MODIFIES","NATURAL","NOT","NO_WRITE_TO_BINLOG","NTH_VALUE","NTILE","NULL","OF","ON","OPTIMIZE","OPTIMIZER_COSTS","OPTION","OPTIONALLY","OR","ORDER","OUT","OUTER","OUTFILE","OVER","PARTITION","PERCENT_RANK","PRIMARY","PROCEDURE","PURGE","RANGE","RANK","READ","READS","READ_WRITE","RECURSIVE","REFERENCES","REGEXP","RELEASE","RENAME","REPEAT","REPLACE","REQUIRE","RESIGNAL","RESTRICT","RETURN","REVOKE","RIGHT","RLIKE","ROW","ROWS","ROW_NUMBER","SCHEMA","SCHEMAS","SECOND_MICROSECOND","SELECT","SENSITIVE","SEPARATOR","SET","SHOW","SIGNAL","SPATIAL","SPECIFIC","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","SQL_BIG_RESULT","SQL_CALC_FOUND_ROWS","SQL_SMALL_RESULT","SSL","STARTING","STORED","STRAIGHT_JOIN","SYSTEM","TABLE","TERMINATED","THEN","TO","TRAILING","TRIGGER","TRUE","UNDO","UNION","UNIQUE","UNLOCK","UNSIGNED","UPDATE","USAGE","USE","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","VALUES","VIRTUAL","WHEN","WHERE","WHILE","WINDOW","WITH","WRITE","XOR","YEAR_MONTH","ZEROFILL"],RS=["BIGINT","BINARY","BIT","BLOB","BOOL","BOOLEAN","CHAR","CHARACTER","DATE","DATETIME","DEC","DECIMAL","DOUBLE PRECISION","DOUBLE","ENUM","FIXED","FLOAT","FLOAT4","FLOAT8","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","LONGBLOB","LONGTEXT","MEDIUMBLOB","MEDIUMINT","MEDIUMTEXT","MIDDLEINT","NATIONAL CHAR","NATIONAL VARCHAR","NUMERIC","PRECISION","REAL","SMALLINT","TEXT","TIME","TIMESTAMP","TINYBLOB","TINYINT","TINYTEXT","VARBINARY","VARCHAR","VARCHARACTER","VARYING","YEAR"],nS=["ABS","ACOS","ADDDATE","ADDTIME","AES_DECRYPT","AES_ENCRYPT","ANY_VALUE","ASCII","ASIN","ATAN","ATAN2","AVG","BENCHMARK","BIN","BIN_TO_UUID","BINARY","BIT_AND","BIT_COUNT","BIT_LENGTH","BIT_OR","BIT_XOR","CAN_ACCESS_COLUMN","CAN_ACCESS_DATABASE","CAN_ACCESS_TABLE","CAN_ACCESS_USER","CAN_ACCESS_VIEW","CAST","CEIL","CEILING","CHAR","CHAR_LENGTH","CHARACTER_LENGTH","CHARSET","COALESCE","COERCIBILITY","COLLATION","COMPRESS","CONCAT","CONCAT_WS","CONNECTION_ID","CONV","CONVERT","CONVERT_TZ","COS","COT","COUNT","CRC32","CUME_DIST","CURDATE","CURRENT_DATE","CURRENT_ROLE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURTIME","DATABASE","DATE","DATE_ADD","DATE_FORMAT","DATE_SUB","DATEDIFF","DAY","DAYNAME","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","DEFAULT","DEGREES","DENSE_RANK","DIV","ELT","EXP","EXPORT_SET","EXTRACT","EXTRACTVALUE","FIELD","FIND_IN_SET","FIRST_VALUE","FLOOR","FORMAT","FORMAT_BYTES","FORMAT_PICO_TIME","FOUND_ROWS","FROM_BASE64","FROM_DAYS","FROM_UNIXTIME","GEOMCOLLECTION","GEOMETRYCOLLECTION","GET_DD_COLUMN_PRIVILEGES","GET_DD_CREATE_OPTIONS","GET_DD_INDEX_SUB_PART_LENGTH","GET_FORMAT","GET_LOCK","GREATEST","GROUP_CONCAT","GROUPING","GTID_SUBSET","GTID_SUBTRACT","HEX","HOUR","ICU_VERSION","IF","IFNULL","INET_ATON","INET_NTOA","INET6_ATON","INET6_NTOA","INSERT","INSTR","INTERNAL_AUTO_INCREMENT","INTERNAL_AVG_ROW_LENGTH","INTERNAL_CHECK_TIME","INTERNAL_CHECKSUM","INTERNAL_DATA_FREE","INTERNAL_DATA_LENGTH","INTERNAL_DD_CHAR_LENGTH","INTERNAL_GET_COMMENT_OR_ERROR","INTERNAL_GET_ENABLED_ROLE_JSON","INTERNAL_GET_HOSTNAME","INTERNAL_GET_USERNAME","INTERNAL_GET_VIEW_WARNING_OR_ERROR","INTERNAL_INDEX_COLUMN_CARDINALITY","INTERNAL_INDEX_LENGTH","INTERNAL_IS_ENABLED_ROLE","INTERNAL_IS_MANDATORY_ROLE","INTERNAL_KEYS_DISABLED","INTERNAL_MAX_DATA_LENGTH","INTERNAL_TABLE_ROWS","INTERNAL_UPDATE_TIME","INTERVAL","IS","IS_FREE_LOCK","IS_IPV4","IS_IPV4_COMPAT","IS_IPV4_MAPPED","IS_IPV6","IS NOT","IS NOT NULL","IS NULL","IS_USED_LOCK","IS_UUID","ISNULL","JSON_ARRAY","JSON_ARRAY_APPEND","JSON_ARRAY_INSERT","JSON_ARRAYAGG","JSON_CONTAINS","JSON_CONTAINS_PATH","JSON_DEPTH","JSON_EXTRACT","JSON_INSERT","JSON_KEYS","JSON_LENGTH","JSON_MERGE","JSON_MERGE_PATCH","JSON_MERGE_PRESERVE","JSON_OBJECT","JSON_OBJECTAGG","JSON_OVERLAPS","JSON_PRETTY","JSON_QUOTE","JSON_REMOVE","JSON_REPLACE","JSON_SCHEMA_VALID","JSON_SCHEMA_VALIDATION_REPORT","JSON_SEARCH","JSON_SET","JSON_STORAGE_FREE","JSON_STORAGE_SIZE","JSON_TABLE","JSON_TYPE","JSON_UNQUOTE","JSON_VALID","JSON_VALUE","LAG","LAST_DAY","LAST_INSERT_ID","LAST_VALUE","LCASE","LEAD","LEAST","LEFT","LENGTH","LIKE","LINESTRING","LN","LOAD_FILE","LOCALTIME","LOCALTIMESTAMP","LOCATE","LOG","LOG10","LOG2","LOWER","LPAD","LTRIM","MAKE_SET","MAKEDATE","MAKETIME","MASTER_POS_WAIT","MATCH","MAX","MBRCONTAINS","MBRCOVEREDBY","MBRCOVERS","MBRDISJOINT","MBREQUALS","MBRINTERSECTS","MBROVERLAPS","MBRTOUCHES","MBRWITHIN","MD5","MEMBER OF","MICROSECOND","MID","MIN","MINUTE","MOD","MONTH","MONTHNAME","MULTILINESTRING","MULTIPOINT","MULTIPOLYGON","NAME_CONST","NOT","NOT IN","NOT LIKE","NOT REGEXP","NOW","NTH_VALUE","NTILE","NULLIF","OCT","OCTET_LENGTH","ORD","PERCENT_RANK","PERIOD_ADD","PERIOD_DIFF","PI","POINT","POLYGON","POSITION","POW","POWER","PS_CURRENT_THREAD_ID","PS_THREAD_ID","QUARTER","QUOTE","RADIANS","RAND","RANDOM_BYTES","RANK","REGEXP","REGEXP_INSTR","REGEXP_LIKE","REGEXP_REPLACE","REGEXP_SUBSTR","RELEASE_ALL_LOCKS","RELEASE_LOCK","REPEAT","REPLACE","REVERSE","RIGHT","RLIKE","ROLES_GRAPHML","ROUND","ROW_COUNT","ROW_NUMBER","RPAD","RTRIM","SCHEMA","SEC_TO_TIME","SECOND","SESSION_USER","SHA1","SHA2","SIGN","SIN","SLEEP","SOUNDEX","SOUNDS LIKE","SOURCE_POS_WAIT","SPACE","SQRT","ST_AREA","ST_ASBINARY","ST_ASGEOJSON","ST_ASTEXT","ST_BUFFER","ST_BUFFER_STRATEGY","ST_CENTROID","ST_COLLECT","ST_CONTAINS","ST_CONVEXHULL","ST_CROSSES","ST_DIFFERENCE","ST_DIMENSION","ST_DISJOINT","ST_DISTANCE","ST_DISTANCE_SPHERE","ST_ENDPOINT","ST_ENVELOPE","ST_EQUALS","ST_EXTERIORRING","ST_FRECHETDISTANCE","ST_GEOHASH","ST_GEOMCOLLFROMTEXT","ST_GEOMCOLLFROMWKB","ST_GEOMETRYN","ST_GEOMETRYTYPE","ST_GEOMFROMGEOJSON","ST_GEOMFROMTEXT","ST_GEOMFROMWKB","ST_HAUSDORFFDISTANCE","ST_INTERIORRINGN","ST_INTERSECTION","ST_INTERSECTS","ST_ISCLOSED","ST_ISEMPTY","ST_ISSIMPLE","ST_ISVALID","ST_LATFROMGEOHASH","ST_LATITUDE","ST_LENGTH","ST_LINEFROMTEXT","ST_LINEFROMWKB","ST_LINEINTERPOLATEPOINT","ST_LINEINTERPOLATEPOINTS","ST_LONGFROMGEOHASH","ST_LONGITUDE","ST_MAKEENVELOPE","ST_MLINEFROMTEXT","ST_MLINEFROMWKB","ST_MPOINTFROMTEXT","ST_MPOINTFROMWKB","ST_MPOLYFROMTEXT","ST_MPOLYFROMWKB","ST_NUMGEOMETRIES","ST_NUMINTERIORRING","ST_NUMPOINTS","ST_OVERLAPS","ST_POINTATDISTANCE","ST_POINTFROMGEOHASH","ST_POINTFROMTEXT","ST_POINTFROMWKB","ST_POINTN","ST_POLYFROMTEXT","ST_POLYFROMWKB","ST_SIMPLIFY","ST_SRID","ST_STARTPOINT","ST_SWAPXY","ST_SYMDIFFERENCE","ST_TOUCHES","ST_TRANSFORM","ST_UNION","ST_VALIDATE","ST_WITHIN","ST_X","ST_Y","STATEMENT_DIGEST","STATEMENT_DIGEST_TEXT","STD","STDDEV","STDDEV_POP","STDDEV_SAMP","STR_TO_DATE","STRCMP","SUBDATE","SUBSTR","SUBSTRING","SUBSTRING_INDEX","SUBTIME","SUM","SYSDATE","SYSTEM_USER","TAN","TIME","TIME_FORMAT","TIME_TO_SEC","TIMEDIFF","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TO_BASE64","TO_DAYS","TO_SECONDS","TRIM","TRUNCATE","UCASE","UNCOMPRESS","UNCOMPRESSED_LENGTH","UNHEX","UNIX_TIMESTAMP","UPDATEXML","UPPER","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","UUID","UUID_SHORT","UUID_TO_BIN","VALIDATE_PASSWORD_STRENGTH","VALUES","VAR_POP","VAR_SAMP","VARIANCE","VERSION","WAIT_FOR_EXECUTED_GTID_SET","WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS","WEEK","WEEKDAY","WEEKOFYEAR","WEIGHT_STRING","YEAR","YEARWEEK"],AS=v(["SELECT [ALL | DISTINCT | DISTINCTROW]"]),sS=v(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO]","REPLACE [LOW_PRIORITY | DELAYED] [INTO]","VALUES","ON DUPLICATE KEY UPDATE","SET"]),Ar=v(["CREATE [TEMPORARY] TABLE [IF NOT EXISTS]"]),Jt=v(["CREATE [OR REPLACE] [SQL SECURITY DEFINER | SQL SECURITY INVOKER] VIEW [IF NOT EXISTS]","UPDATE [LOW_PRIORITY] [IGNORE]","DELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM","DROP [TEMPORARY] TABLE [IF EXISTS]","ALTER TABLE","ADD [COLUMN]","{CHANGE | MODIFY} [COLUMN]","DROP [COLUMN]","RENAME [TO | AS]","RENAME COLUMN","ALTER [COLUMN]","{SET | DROP} DEFAULT","TRUNCATE [TABLE]","ALTER DATABASE","ALTER EVENT","ALTER FUNCTION","ALTER INSTANCE","ALTER LOGFILE GROUP","ALTER PROCEDURE","ALTER RESOURCE GROUP","ALTER SERVER","ALTER TABLESPACE","ALTER USER","ALTER VIEW","ANALYZE TABLE","BINLOG","CACHE INDEX","CALL","CHANGE MASTER TO","CHANGE REPLICATION FILTER","CHANGE REPLICATION SOURCE TO","CHECK TABLE","CHECKSUM TABLE","CLONE","COMMIT","CREATE DATABASE","CREATE EVENT","CREATE FUNCTION","CREATE FUNCTION","CREATE INDEX","CREATE LOGFILE GROUP","CREATE PROCEDURE","CREATE RESOURCE GROUP","CREATE ROLE","CREATE SERVER","CREATE SPATIAL REFERENCE SYSTEM","CREATE TABLESPACE","CREATE TRIGGER","CREATE USER","DEALLOCATE PREPARE","DESCRIBE","DROP DATABASE","DROP EVENT","DROP FUNCTION","DROP FUNCTION","DROP INDEX","DROP LOGFILE GROUP","DROP PROCEDURE","DROP RESOURCE GROUP","DROP ROLE","DROP SERVER","DROP SPATIAL REFERENCE SYSTEM","DROP TABLESPACE","DROP TRIGGER","DROP USER","DROP VIEW","EXECUTE","EXPLAIN","FLUSH","GRANT","HANDLER","HELP","IMPORT TABLE","INSTALL COMPONENT","INSTALL PLUGIN","KILL","LOAD DATA","LOAD INDEX INTO CACHE","LOAD XML","LOCK INSTANCE FOR BACKUP","LOCK TABLES","MASTER_POS_WAIT","OPTIMIZE TABLE","PREPARE","PURGE BINARY LOGS","RELEASE SAVEPOINT","RENAME TABLE","RENAME USER","REPAIR TABLE","RESET","RESET MASTER","RESET PERSIST","RESET REPLICA","RESET SLAVE","RESTART","REVOKE","ROLLBACK","ROLLBACK TO SAVEPOINT","SAVEPOINT","SET CHARACTER SET","SET DEFAULT ROLE","SET NAMES","SET PASSWORD","SET RESOURCE GROUP","SET ROLE","SET TRANSACTION","SHOW","SHOW BINARY LOGS","SHOW BINLOG EVENTS","SHOW CHARACTER SET","SHOW COLLATION","SHOW COLUMNS","SHOW CREATE DATABASE","SHOW CREATE EVENT","SHOW CREATE FUNCTION","SHOW CREATE PROCEDURE","SHOW CREATE TABLE","SHOW CREATE TRIGGER","SHOW CREATE USER","SHOW CREATE VIEW","SHOW DATABASES","SHOW ENGINE","SHOW ENGINES","SHOW ERRORS","SHOW EVENTS","SHOW FUNCTION CODE","SHOW FUNCTION STATUS","SHOW GRANTS","SHOW INDEX","SHOW MASTER STATUS","SHOW OPEN TABLES","SHOW PLUGINS","SHOW PRIVILEGES","SHOW PROCEDURE CODE","SHOW PROCEDURE STATUS","SHOW PROCESSLIST","SHOW PROFILE","SHOW PROFILES","SHOW RELAYLOG EVENTS","SHOW REPLICA STATUS","SHOW REPLICAS","SHOW SLAVE","SHOW SLAVE HOSTS","SHOW STATUS","SHOW TABLE STATUS","SHOW TABLES","SHOW TRIGGERS","SHOW VARIABLES","SHOW WARNINGS","SHUTDOWN","SOURCE_POS_WAIT","START GROUP_REPLICATION","START REPLICA","START SLAVE","START TRANSACTION","STOP GROUP_REPLICATION","STOP REPLICA","STOP SLAVE","TABLE","UNINSTALL COMPONENT","UNINSTALL PLUGIN","UNLOCK INSTANCE","UNLOCK TABLES","USE","XA","ITERATE","LEAVE","LOOP","REPEAT","RETURN","WHILE"]),SS=v(["UNION [ALL | DISTINCT]"]),oS=v(["JOIN","{LEFT | RIGHT} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT} [OUTER] JOIN","STRAIGHT_JOIN"]),OS=v(["ON {UPDATE | DELETE} [SET NULL]","CHARACTER SET","{ROWS | RANGE} BETWEEN","IDENTIFIED BY"]),iS={name:"mysql",tokenizerOptions:{reservedSelect:AS,reservedClauses:[...sS,...Ar,...Jt],reservedSetOperations:SS,reservedJoins:oS,reservedPhrases:OS,supportsXor:!0,reservedKeywords:rS,reservedDataTypes:RS,reservedFunctionNames:nS,stringTypes:['""-qq-bs',{quote:"''-qq-bs",prefixes:["N"]},{quote:"''-raw",prefixes:["B","X"],requirePrefix:!0}],identTypes:["``"],identChars:{first:"$",rest:"$",allowFirstCharNumber:!0},variableTypes:[{regex:"@@?[A-Za-z0-9_.$]+"},{quote:'""-qq-bs',prefixes:["@"],requirePrefix:!0},{quote:"''-qq-bs",prefixes:["@"],requirePrefix:!0},{quote:"``",prefixes:["@"],requirePrefix:!0}],paramTypes:{positional:!0},lineCommentTypes:["--","#"],operators:["%",":=","&","|","^","~","<<",">>","<=>","->","->>","&&","||","!","*.*"],postProcess:bt},formatOptions:{onelineClauses:[...Ar,...Jt],tabularOnelineClauses:Jt}},aS=["ADD","ALL","ALTER","ANALYZE","AND","ARRAY","AS","ASC","BETWEEN","BOTH","BY","CALL","CASCADE","CASE","CHANGE","CHECK","COLLATE","COLUMN","CONSTRAINT","CONTINUE","CONVERT","CREATE","CROSS","CURRENT_DATE","CURRENT_ROLE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DATABASES","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DEFAULT","DELAYED","DELETE","DESC","DESCRIBE","DISTINCT","DISTINCTROW","DIV","DOUBLE","DROP","DUAL","ELSE","ELSEIF","ENCLOSED","ESCAPED","EXCEPT","EXISTS","EXIT","EXPLAIN","FALSE","FETCH","FOR","FORCE","FOREIGN","FROM","FULLTEXT","GENERATED","GRANT","GROUP","GROUPS","HAVING","HIGH_PRIORITY","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IF","IGNORE","ILIKE","IN","INDEX","INFILE","INNER","INOUT","INSERT","INTERSECT","INTERVAL","INTO","IS","ITERATE","JOIN","KEY","KEYS","KILL","LEADING","LEAVE","LEFT","LIKE","LIMIT","LINEAR","LINES","LOAD","LOCALTIME","LOCALTIMESTAMP","LOCK","LONG","LOW_PRIORITY","MATCH","MAXVALUE","MINUTE_MICROSECOND","MINUTE_SECOND","MOD","NATURAL","NOT","NO_WRITE_TO_BINLOG","NULL","OF","ON","OPTIMIZE","OPTION","OPTIONALLY","OR","ORDER","OUT","OUTER","OUTFILE","OVER","PARTITION","PRIMARY","PROCEDURE","RANGE","READ","RECURSIVE","REFERENCES","REGEXP","RELEASE","RENAME","REPEAT","REPLACE","REQUIRE","RESTRICT","REVOKE","RIGHT","RLIKE","ROW","ROWS","SECOND_MICROSECOND","SELECT","SET","SHOW","SPATIAL","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","SQL_BIG_RESULT","SQL_CALC_FOUND_ROWS","SQL_SMALL_RESULT","SSL","STARTING","STATS_EXTENDED","STORED","STRAIGHT_JOIN","TABLE","TABLESAMPLE","TERMINATED","THEN","TO","TRAILING","TRIGGER","TRUE","TiDB_CURRENT_TSO","UNION","UNIQUE","UNLOCK","UNSIGNED","UNTIL","UPDATE","USAGE","USE","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","VALUES","VIRTUAL","WHEN","WHERE","WHILE","WINDOW","WITH","WRITE","XOR","YEAR_MONTH","ZEROFILL"],IS=["BIGINT","BINARY","BIT","BLOB","BOOL","BOOLEAN","CHAR","CHARACTER","DATE","DATETIME","DEC","DECIMAL","DOUBLE PRECISION","DOUBLE","ENUM","FIXED","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","LONGBLOB","LONGTEXT","MEDIUMBLOB","MEDIUMINT","MIDDLEINT","NATIONAL CHAR","NATIONAL VARCHAR","NUMERIC","PRECISION","SMALLINT","TEXT","TIME","TIMESTAMP","TINYBLOB","TINYINT","TINYTEXT","VARBINARY","VARCHAR","VARCHARACTER","VARYING","YEAR"],NS=["ABS","ACOS","ADDDATE","ADDTIME","AES_DECRYPT","AES_ENCRYPT","ANY_VALUE","ASCII","ASIN","ATAN","ATAN2","AVG","BENCHMARK","BIN","BIN_TO_UUID","BIT_AND","BIT_COUNT","BIT_LENGTH","BIT_OR","BIT_XOR","BITAND","BITNEG","BITOR","BITXOR","CASE","CAST","CEIL","CEILING","CHAR_FUNC","CHAR_LENGTH","CHARACTER_LENGTH","CHARSET","COALESCE","COERCIBILITY","COLLATION","COMPRESS","CONCAT","CONCAT_WS","CONNECTION_ID","CONV","CONVERT","CONVERT_TZ","COS","COT","COUNT","CRC32","CUME_DIST","CURDATE","CURRENT_DATE","CURRENT_RESOURCE_GROUP","CURRENT_ROLE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURTIME","DATABASE","DATE","DATE_ADD","DATE_FORMAT","DATE_SUB","DATEDIFF","DAY","DAYNAME","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","DECODE","DEFAULT_FUNC","DEGREES","DENSE_RANK","DES_DECRYPT","DES_ENCRYPT","DIV","ELT","ENCODE","ENCRYPT","EQ","EXP","EXPORT_SET","EXTRACT","FIELD","FIND_IN_SET","FIRST_VALUE","FLOOR","FORMAT","FORMAT_BYTES","FORMAT_NANO_TIME","FOUND_ROWS","FROM_BASE64","FROM_DAYS","FROM_UNIXTIME","GE","GET_FORMAT","GET_LOCK","GETPARAM","GREATEST","GROUP_CONCAT","GROUPING","GT","HEX","HOUR","IF","IFNULL","ILIKE","INET6_ATON","INET6_NTOA","INET_ATON","INET_NTOA","INSERT_FUNC","INSTR","INTDIV","INTERVAL","IS_FREE_LOCK","IS_IPV4","IS_IPV4_COMPAT","IS_IPV4_MAPPED","IS_IPV6","IS_USED_LOCK","IS_UUID","ISFALSE","ISNULL","ISTRUE","JSON_ARRAY","JSON_ARRAYAGG","JSON_ARRAY_APPEND","JSON_ARRAY_INSERT","JSON_CONTAINS","JSON_CONTAINS_PATH","JSON_DEPTH","JSON_EXTRACT","JSON_INSERT","JSON_KEYS","JSON_LENGTH","JSON_MEMBEROF","JSON_MERGE","JSON_MERGE_PATCH","JSON_MERGE_PRESERVE","JSON_OBJECT","JSON_OBJECTAGG","JSON_OVERLAPS","JSON_PRETTY","JSON_QUOTE","JSON_REMOVE","JSON_REPLACE","JSON_SEARCH","JSON_SET","JSON_STORAGE_FREE","JSON_STORAGE_SIZE","JSON_TYPE","JSON_UNQUOTE","JSON_VALID","LAG","LAST_DAY","LAST_INSERT_ID","LAST_VALUE","LASTVAL","LCASE","LE","LEAD","LEAST","LEFT","LEFTSHIFT","LENGTH","LIKE","LN","LOAD_FILE","LOCALTIME","LOCALTIMESTAMP","LOCATE","LOG","LOG10","LOG2","LOWER","LPAD","LT","LTRIM","MAKE_SET","MAKEDATE","MAKETIME","MASTER_POS_WAIT","MAX","MD5","MICROSECOND","MID","MIN","MINUS","MINUTE","MOD","MONTH","MONTHNAME","MUL","NAME_CONST","NE","NEXTVAL","NOT","NOW","NTH_VALUE","NTILE","NULLEQ","OCT","OCTET_LENGTH","OLD_PASSWORD","ORD","PASSWORD_FUNC","PERCENT_RANK","PERIOD_ADD","PERIOD_DIFF","PI","PLUS","POSITION","POW","POWER","QUARTER","QUOTE","RADIANS","RAND","RANDOM_BYTES","RANK","REGEXP","REGEXP_INSTR","REGEXP_LIKE","REGEXP_REPLACE","REGEXP_SUBSTR","RELEASE_ALL_LOCKS","RELEASE_LOCK","REPEAT","REPLACE","REVERSE","RIGHT","RIGHTSHIFT","ROUND","ROW_COUNT","ROW_NUMBER","RPAD","RTRIM","SCHEMA","SEC_TO_TIME","SECOND","SESSION_USER","SETVAL","SETVAR","SHA","SHA1","SHA2","SIGN","SIN","SLEEP","SM3","SPACE","SQRT","STD","STDDEV","STDDEV_POP","STDDEV_SAMP","STR_TO_DATE","STRCMP","SUBDATE","SUBSTR","SUBSTRING","SUBSTRING_INDEX","SUBTIME","SUM","SYSDATE","SYSTEM_USER","TAN","TIDB_BOUNDED_STALENESS","TIDB_CURRENT_TSO","TIDB_DECODE_BINARY_PLAN","TIDB_DECODE_KEY","TIDB_DECODE_PLAN","TIDB_DECODE_SQL_DIGESTS","TIDB_ENCODE_SQL_DIGEST","TIDB_IS_DDL_OWNER","TIDB_PARSE_TSO","TIDB_PARSE_TSO_LOGICAL","TIDB_ROW_CHECKSUM","TIDB_SHARD","TIDB_VERSION","TIME","TIME_FORMAT","TIME_TO_SEC","TIMEDIFF","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TO_BASE64","TO_DAYS","TO_SECONDS","TRANSLATE","TRIM","TRUNCATE","UCASE","UNARYMINUS","UNCOMPRESS","UNCOMPRESSED_LENGTH","UNHEX","UNIX_TIMESTAMP","UPPER","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","UUID","UUID_SHORT","UUID_TO_BIN","VALIDATE_PASSWORD_STRENGTH","VAR_POP","VAR_SAMP","VARIANCE","VERSION","VITESS_HASH","WEEK","WEEKDAY","WEEKOFYEAR","WEIGHT_STRING","YEAR","YEARWEEK"],lS=v(["SELECT [ALL | DISTINCT | DISTINCTROW]"]),_S=v(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO]","REPLACE [LOW_PRIORITY | DELAYED] [INTO]","VALUES","ON DUPLICATE KEY UPDATE","SET"]),sr=v(["CREATE [TEMPORARY] TABLE [IF NOT EXISTS]"]),qt=v(["CREATE [OR REPLACE] [SQL SECURITY DEFINER | SQL SECURITY INVOKER] VIEW [IF NOT EXISTS]","UPDATE [LOW_PRIORITY] [IGNORE]","DELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM","DROP [TEMPORARY] TABLE [IF EXISTS]","ALTER TABLE","ADD [COLUMN]","{CHANGE | MODIFY} [COLUMN]","DROP [COLUMN]","RENAME [TO | AS]","RENAME COLUMN","ALTER [COLUMN]","{SET | DROP} DEFAULT","TRUNCATE [TABLE]","ALTER DATABASE","ALTER INSTANCE","ALTER RESOURCE GROUP","ALTER SEQUENCE","ALTER USER","ALTER VIEW","ANALYZE TABLE","CHECK TABLE","CHECKSUM TABLE","COMMIT","CREATE DATABASE","CREATE INDEX","CREATE RESOURCE GROUP","CREATE ROLE","CREATE SEQUENCE","CREATE USER","DEALLOCATE PREPARE","DESCRIBE","DROP DATABASE","DROP INDEX","DROP RESOURCE GROUP","DROP ROLE","DROP TABLESPACE","DROP USER","DROP VIEW","EXPLAIN","FLUSH","GRANT","IMPORT TABLE","INSTALL COMPONENT","INSTALL PLUGIN","KILL","LOAD DATA","LOCK INSTANCE FOR BACKUP","LOCK TABLES","OPTIMIZE TABLE","PREPARE","RELEASE SAVEPOINT","RENAME TABLE","RENAME USER","REPAIR TABLE","RESET","REVOKE","ROLLBACK","ROLLBACK TO SAVEPOINT","SAVEPOINT","SET CHARACTER SET","SET DEFAULT ROLE","SET NAMES","SET PASSWORD","SET RESOURCE GROUP","SET ROLE","SET TRANSACTION","SHOW","SHOW BINARY LOGS","SHOW BINLOG EVENTS","SHOW CHARACTER SET","SHOW COLLATION","SHOW COLUMNS","SHOW CREATE DATABASE","SHOW CREATE TABLE","SHOW CREATE USER","SHOW CREATE VIEW","SHOW DATABASES","SHOW ENGINE","SHOW ENGINES","SHOW ERRORS","SHOW EVENTS","SHOW GRANTS","SHOW INDEX","SHOW MASTER STATUS","SHOW OPEN TABLES","SHOW PLUGINS","SHOW PRIVILEGES","SHOW PROCESSLIST","SHOW PROFILE","SHOW PROFILES","SHOW STATUS","SHOW TABLE STATUS","SHOW TABLES","SHOW TRIGGERS","SHOW VARIABLES","SHOW WARNINGS","TABLE","UNINSTALL COMPONENT","UNINSTALL PLUGIN","UNLOCK INSTANCE","UNLOCK TABLES","USE"]),LS=v(["UNION [ALL | DISTINCT]"]),CS=v(["JOIN","{LEFT | RIGHT} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT} [OUTER] JOIN","STRAIGHT_JOIN"]),uS=v(["ON {UPDATE | DELETE} [SET NULL]","CHARACTER SET","{ROWS | RANGE} BETWEEN","IDENTIFIED BY"]),cS={name:"tidb",tokenizerOptions:{reservedSelect:lS,reservedClauses:[..._S,...sr,...qt],reservedSetOperations:LS,reservedJoins:CS,reservedPhrases:uS,supportsXor:!0,reservedKeywords:aS,reservedDataTypes:IS,reservedFunctionNames:NS,stringTypes:['""-qq-bs',{quote:"''-qq-bs",prefixes:["N"]},{quote:"''-raw",prefixes:["B","X"],requirePrefix:!0}],identTypes:["``"],identChars:{first:"$",rest:"$",allowFirstCharNumber:!0},variableTypes:[{regex:"@@?[A-Za-z0-9_.$]+"},{quote:'""-qq-bs',prefixes:["@"],requirePrefix:!0},{quote:"''-qq-bs",prefixes:["@"],requirePrefix:!0},{quote:"``",prefixes:["@"],requirePrefix:!0}],paramTypes:{positional:!0},lineCommentTypes:["--","#"],operators:["%",":=","&","|","^","~","<<",">>","<=>","->","->>","&&","||","!","*.*"],postProcess:bt},formatOptions:{onelineClauses:[...sr,...qt],tabularOnelineClauses:qt}},fS=["ABORT","ABS","ACOS","ADVISOR","ARRAY_AGG","ARRAY_AGG","ARRAY_APPEND","ARRAY_AVG","ARRAY_BINARY_SEARCH","ARRAY_CONCAT","ARRAY_CONTAINS","ARRAY_COUNT","ARRAY_DISTINCT","ARRAY_EXCEPT","ARRAY_FLATTEN","ARRAY_IFNULL","ARRAY_INSERT","ARRAY_INTERSECT","ARRAY_LENGTH","ARRAY_MAX","ARRAY_MIN","ARRAY_MOVE","ARRAY_POSITION","ARRAY_PREPEND","ARRAY_PUT","ARRAY_RANGE","ARRAY_REMOVE","ARRAY_REPEAT","ARRAY_REPLACE","ARRAY_REVERSE","ARRAY_SORT","ARRAY_STAR","ARRAY_SUM","ARRAY_SYMDIFF","ARRAY_SYMDIFF1","ARRAY_SYMDIFFN","ARRAY_UNION","ASIN","ATAN","ATAN2","AVG","BASE64","BASE64_DECODE","BASE64_ENCODE","BITAND ","BITCLEAR ","BITNOT ","BITOR ","BITSET ","BITSHIFT ","BITTEST ","BITXOR ","CEIL","CLOCK_LOCAL","CLOCK_MILLIS","CLOCK_STR","CLOCK_TZ","CLOCK_UTC","COALESCE","CONCAT","CONCAT2","CONTAINS","CONTAINS_TOKEN","CONTAINS_TOKEN_LIKE","CONTAINS_TOKEN_REGEXP","COS","COUNT","COUNT","COUNTN","CUME_DIST","CURL","DATE_ADD_MILLIS","DATE_ADD_STR","DATE_DIFF_MILLIS","DATE_DIFF_STR","DATE_FORMAT_STR","DATE_PART_MILLIS","DATE_PART_STR","DATE_RANGE_MILLIS","DATE_RANGE_STR","DATE_TRUNC_MILLIS","DATE_TRUNC_STR","DECODE","DECODE_JSON","DEGREES","DENSE_RANK","DURATION_TO_STR","ENCODED_SIZE","ENCODE_JSON","EXP","FIRST_VALUE","FLOOR","GREATEST","HAS_TOKEN","IFINF","IFMISSING","IFMISSINGORNULL","IFNAN","IFNANORINF","IFNULL","INITCAP","ISARRAY","ISATOM","ISBITSET","ISBOOLEAN","ISNUMBER","ISOBJECT","ISSTRING","LAG","LAST_VALUE","LEAD","LEAST","LENGTH","LN","LOG","LOWER","LTRIM","MAX","MEAN","MEDIAN","META","MILLIS","MILLIS_TO_LOCAL","MILLIS_TO_STR","MILLIS_TO_TZ","MILLIS_TO_UTC","MILLIS_TO_ZONE_NAME","MIN","MISSINGIF","NANIF","NEGINFIF","NOW_LOCAL","NOW_MILLIS","NOW_STR","NOW_TZ","NOW_UTC","NTH_VALUE","NTILE","NULLIF","NVL","NVL2","OBJECT_ADD","OBJECT_CONCAT","OBJECT_INNER_PAIRS","OBJECT_INNER_VALUES","OBJECT_LENGTH","OBJECT_NAMES","OBJECT_PAIRS","OBJECT_PUT","OBJECT_REMOVE","OBJECT_RENAME","OBJECT_REPLACE","OBJECT_UNWRAP","OBJECT_VALUES","PAIRS","PERCENT_RANK","PI","POLY_LENGTH","POSINFIF","POSITION","POWER","RADIANS","RANDOM","RANK","RATIO_TO_REPORT","REGEXP_CONTAINS","REGEXP_LIKE","REGEXP_MATCHES","REGEXP_POSITION","REGEXP_REPLACE","REGEXP_SPLIT","REGEX_CONTAINS","REGEX_LIKE","REGEX_MATCHES","REGEX_POSITION","REGEX_REPLACE","REGEX_SPLIT","REPEAT","REPLACE","REVERSE","ROUND","ROW_NUMBER","RTRIM","SEARCH","SEARCH_META","SEARCH_SCORE","SIGN","SIN","SPLIT","SQRT","STDDEV","STDDEV_POP","STDDEV_SAMP","STR_TO_DURATION","STR_TO_MILLIS","STR_TO_TZ","STR_TO_UTC","STR_TO_ZONE_NAME","SUBSTR","SUFFIXES","SUM","TAN","TITLE","TOARRAY","TOATOM","TOBOOLEAN","TOKENS","TOKENS","TONUMBER","TOOBJECT","TOSTRING","TRIM","TRUNC","UPPER","UUID","VARIANCE","VARIANCE_POP","VARIANCE_SAMP","VAR_POP","VAR_SAMP","WEEKDAY_MILLIS","WEEKDAY_STR","CAST"],PS=["ADVISE","ALL","ALTER","ANALYZE","AND","ANY","ARRAY","AS","ASC","AT","BEGIN","BETWEEN","BINARY","BOOLEAN","BREAK","BUCKET","BUILD","BY","CALL","CASE","CAST","CLUSTER","COLLATE","COLLECTION","COMMIT","COMMITTED","CONNECT","CONTINUE","CORRELATED","COVER","CREATE","CURRENT","DATABASE","DATASET","DATASTORE","DECLARE","DECREMENT","DELETE","DERIVED","DESC","DESCRIBE","DISTINCT","DO","DROP","EACH","ELEMENT","ELSE","END","EVERY","EXCEPT","EXCLUDE","EXECUTE","EXISTS","EXPLAIN","FALSE","FETCH","FILTER","FIRST","FLATTEN","FLUSH","FOLLOWING","FOR","FORCE","FROM","FTS","FUNCTION","GOLANG","GRANT","GROUP","GROUPS","GSI","HASH","HAVING","IF","IGNORE","ILIKE","IN","INCLUDE","INCREMENT","INDEX","INFER","INLINE","INNER","INSERT","INTERSECT","INTO","IS","ISOLATION","JAVASCRIPT","JOIN","KEY","KEYS","KEYSPACE","KNOWN","LANGUAGE","LAST","LEFT","LET","LETTING","LEVEL","LIKE","LIMIT","LSM","MAP","MAPPING","MATCHED","MATERIALIZED","MERGE","MINUS","MISSING","NAMESPACE","NEST","NL","NO","NOT","NTH_VALUE","NULL","NULLS","NUMBER","OBJECT","OFFSET","ON","OPTION","OPTIONS","OR","ORDER","OTHERS","OUTER","OVER","PARSE","PARTITION","PASSWORD","PATH","POOL","PRECEDING","PREPARE","PRIMARY","PRIVATE","PRIVILEGE","PROBE","PROCEDURE","PUBLIC","RANGE","RAW","REALM","REDUCE","RENAME","RESPECT","RETURN","RETURNING","REVOKE","RIGHT","ROLE","ROLLBACK","ROW","ROWS","SATISFIES","SAVEPOINT","SCHEMA","SCOPE","SELECT","SELF","SEMI","SET","SHOW","SOME","START","STATISTICS","STRING","SYSTEM","THEN","TIES","TO","TRAN","TRANSACTION","TRIGGER","TRUE","TRUNCATE","UNBOUNDED","UNDER","UNION","UNIQUE","UNKNOWN","UNNEST","UNSET","UPDATE","UPSERT","USE","USER","USING","VALIDATE","VALUE","VALUED","VALUES","VIA","VIEW","WHEN","WHERE","WHILE","WINDOW","WITH","WITHIN","WORK","XOR"],DS=[],dS=v(["SELECT [ALL | DISTINCT]"]),pS=v(["WITH","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT INTO","VALUES","SET","MERGE INTO","WHEN [NOT] MATCHED THEN","UPDATE SET","INSERT","NEST","UNNEST","RETURNING"]),Sr=v(["UPDATE","DELETE FROM","SET SCHEMA","ADVISE","ALTER INDEX","BEGIN TRANSACTION","BUILD INDEX","COMMIT TRANSACTION","CREATE COLLECTION","CREATE FUNCTION","CREATE INDEX","CREATE PRIMARY INDEX","CREATE SCOPE","DROP COLLECTION","DROP FUNCTION","DROP INDEX","DROP PRIMARY INDEX","DROP SCOPE","EXECUTE","EXECUTE FUNCTION","EXPLAIN","GRANT","INFER","PREPARE","REVOKE","ROLLBACK TRANSACTION","SAVEPOINT","SET TRANSACTION","UPDATE STATISTICS","UPSERT","LET","SET CURRENT SCHEMA","SHOW","USE [PRIMARY] KEYS"]),MS=v(["UNION [ALL]","EXCEPT [ALL]","INTERSECT [ALL]"]),US=v(["JOIN","{LEFT | RIGHT} [OUTER] JOIN","INNER JOIN"]),mS=v(["{ROWS | RANGE | GROUPS} BETWEEN"]),hS={name:"n1ql",tokenizerOptions:{reservedSelect:dS,reservedClauses:[...pS,...Sr],reservedSetOperations:MS,reservedJoins:US,reservedPhrases:mS,supportsXor:!0,reservedKeywords:PS,reservedDataTypes:DS,reservedFunctionNames:fS,stringTypes:['""-bs',"''-bs"],identTypes:["``"],extraParens:["[]","{}"],paramTypes:{positional:!0,numbered:["$"],named:["$"]},lineCommentTypes:["#","--"],operators:["%","==",":","||"]},formatOptions:{onelineClauses:Sr}},GS=["ADD","AGENT","AGGREGATE","ALL","ALTER","AND","ANY","ARROW","AS","ASC","AT","ATTRIBUTE","AUTHID","AVG","BEGIN","BETWEEN","BLOCK","BODY","BOTH","BOUND","BULK","BY","BYTE","CALL","CALLING","CASCADE","CASE","CHARSET","CHARSETFORM","CHARSETID","CHECK","CLOSE","CLUSTER","CLUSTERS","COLAUTH","COLLECT","COLUMNS","COMMENT","COMMIT","COMMITTED","COMPILED","COMPRESS","CONNECT","CONSTANT","CONSTRUCTOR","CONTEXT","CONVERT","COUNT","CRASH","CREATE","CURRENT","CURSOR","CUSTOMDATUM","DANGLING","DATA","DAY","DECLARE","DEFAULT","DEFINE","DELETE","DESC","DETERMINISTIC","DISTINCT","DROP","DURATION","ELEMENT","ELSE","ELSIF","EMPTY","END","ESCAPE","EXCEPT","EXCEPTION","EXCEPTIONS","EXCLUSIVE","EXECUTE","EXISTS","EXIT","EXTERNAL","FETCH","FINAL","FIXED","FOR","FORALL","FORCE","FORM","FROM","FUNCTION","GENERAL","GOTO","GRANT","GROUP","HASH","HAVING","HEAP","HIDDEN","HOUR","IDENTIFIED","IF","IMMEDIATE","IN","INCLUDING","INDEX","INDEXES","INDICATOR","INDICES","INFINITE","INSERT","INSTANTIABLE","INTERFACE","INTERSECT","INTERVAL","INTO","INVALIDATE","IS","ISOLATION","JAVA","LANGUAGE","LARGE","LEADING","LENGTH","LEVEL","LIBRARY","LIKE","LIKE2","LIKE4","LIKEC","LIMIT","LIMITED","LOCAL","LOCK","LOOP","MAP","MAX","MAXLEN","MEMBER","MERGE","MIN","MINUS","MINUTE","MOD","MODE","MODIFY","MONTH","MULTISET","NAME","NAN","NATIONAL","NATIVE","NEW","NOCOMPRESS","NOCOPY","NOT","NOWAIT","NULL","OBJECT","OCICOLL","OCIDATE","OCIDATETIME","OCIDURATION","OCIINTERVAL","OCILOBLOCATOR","OCINUMBER","OCIRAW","OCIREF","OCIREFCURSOR","OCIROWID","OCISTRING","OCITYPE","OF","ON","ONLY","OPAQUE","OPEN","OPERATOR","OPTION","OR","ORACLE","ORADATA","ORDER","OVERLAPS","ORGANIZATION","ORLANY","ORLVARY","OTHERS","OUT","OVERRIDING","PACKAGE","PARALLEL_ENABLE","PARAMETER","PARAMETERS","PARTITION","PASCAL","PIPE","PIPELINED","PRAGMA","PRIOR","PRIVATE","PROCEDURE","PUBLIC","RAISE","RANGE","READ","RECORD","REF","REFERENCE","REM","REMAINDER","RENAME","RESOURCE","RESULT","RETURN","RETURNING","REVERSE","REVOKE","ROLLBACK","ROW","SAMPLE","SAVE","SAVEPOINT","SB1","SB2","SB4","SECOND","SEGMENT","SELECT","SELF","SEPARATE","SEQUENCE","SERIALIZABLE","SET","SHARE","SHORT","SIZE","SIZE_T","SOME","SPARSE","SQL","SQLCODE","SQLDATA","SQLNAME","SQLSTATE","STANDARD","START","STATIC","STDDEV","STORED","STRING","STRUCT","STYLE","SUBMULTISET","SUBPARTITION","SUBSTITUTABLE","SUBTYPE","SUM","SYNONYM","TABAUTH","TABLE","TDO","THE","THEN","TIME","TIMEZONE_ABBR","TIMEZONE_HOUR","TIMEZONE_MINUTE","TIMEZONE_REGION","TO","TRAILING","TRANSAC","TRANSACTIONAL","TRUSTED","TYPE","UB1","UB2","UB4","UNDER","UNION","UNIQUE","UNSIGNED","UNTRUSTED","UPDATE","USE","USING","VALIST","VALUE","VALUES","VARIABLE","VARIANCE","VARRAY","VIEW","VIEWS","VOID","WHEN","WHERE","WHILE","WITH","WORK","WRAPPED","WRITE","YEAR","ZONE"],gS=["ARRAY","BFILE_BASE","BINARY","BLOB_BASE","CHAR VARYING","CHAR_BASE","CHAR","CHARACTER VARYING","CHARACTER","CLOB_BASE","DATE_BASE","DATE","DECIMAL","DOUBLE","FLOAT","INT","INTERVAL DAY","INTERVAL YEAR","LONG","NATIONAL CHAR VARYING","NATIONAL CHAR","NATIONAL CHARACTER VARYING","NATIONAL CHARACTER","NCHAR VARYING","NCHAR","NCHAR","NUMBER_BASE","NUMBER","NUMBERIC","NVARCHAR","PRECISION","RAW","TIMESTAMP","UROWID","VARCHAR","VARCHAR2"],HS=["ABS","ACOS","ASIN","ATAN","ATAN2","BITAND","CEIL","COS","COSH","EXP","FLOOR","LN","LOG","MOD","NANVL","POWER","REMAINDER","ROUND","SIGN","SIN","SINH","SQRT","TAN","TANH","TRUNC","WIDTH_BUCKET","CHR","CONCAT","INITCAP","LOWER","LPAD","LTRIM","NLS_INITCAP","NLS_LOWER","NLSSORT","NLS_UPPER","REGEXP_REPLACE","REGEXP_SUBSTR","REPLACE","RPAD","RTRIM","SOUNDEX","SUBSTR","TRANSLATE","TREAT","TRIM","UPPER","NLS_CHARSET_DECL_LEN","NLS_CHARSET_ID","NLS_CHARSET_NAME","ASCII","INSTR","LENGTH","REGEXP_INSTR","ADD_MONTHS","CURRENT_DATE","CURRENT_TIMESTAMP","DBTIMEZONE","EXTRACT","FROM_TZ","LAST_DAY","LOCALTIMESTAMP","MONTHS_BETWEEN","NEW_TIME","NEXT_DAY","NUMTODSINTERVAL","NUMTOYMINTERVAL","ROUND","SESSIONTIMEZONE","SYS_EXTRACT_UTC","SYSDATE","SYSTIMESTAMP","TO_CHAR","TO_TIMESTAMP","TO_TIMESTAMP_TZ","TO_DSINTERVAL","TO_YMINTERVAL","TRUNC","TZ_OFFSET","GREATEST","LEAST","ASCIISTR","BIN_TO_NUM","CAST","CHARTOROWID","COMPOSE","CONVERT","DECOMPOSE","HEXTORAW","NUMTODSINTERVAL","NUMTOYMINTERVAL","RAWTOHEX","RAWTONHEX","ROWIDTOCHAR","ROWIDTONCHAR","SCN_TO_TIMESTAMP","TIMESTAMP_TO_SCN","TO_BINARY_DOUBLE","TO_BINARY_FLOAT","TO_CHAR","TO_CLOB","TO_DATE","TO_DSINTERVAL","TO_LOB","TO_MULTI_BYTE","TO_NCHAR","TO_NCLOB","TO_NUMBER","TO_DSINTERVAL","TO_SINGLE_BYTE","TO_TIMESTAMP","TO_TIMESTAMP_TZ","TO_YMINTERVAL","TO_YMINTERVAL","TRANSLATE","UNISTR","BFILENAME","EMPTY_BLOB,","EMPTY_CLOB","CARDINALITY","COLLECT","POWERMULTISET","POWERMULTISET_BY_CARDINALITY","SET","SYS_CONNECT_BY_PATH","CLUSTER_ID","CLUSTER_PROBABILITY","CLUSTER_SET","FEATURE_ID","FEATURE_SET","FEATURE_VALUE","PREDICTION","PREDICTION_COST","PREDICTION_DETAILS","PREDICTION_PROBABILITY","PREDICTION_SET","APPENDCHILDXML","DELETEXML","DEPTH","EXTRACT","EXISTSNODE","EXTRACTVALUE","INSERTCHILDXML","INSERTXMLBEFORE","PATH","SYS_DBURIGEN","SYS_XMLAGG","SYS_XMLGEN","UPDATEXML","XMLAGG","XMLCDATA","XMLCOLATTVAL","XMLCOMMENT","XMLCONCAT","XMLFOREST","XMLPARSE","XMLPI","XMLQUERY","XMLROOT","XMLSEQUENCE","XMLSERIALIZE","XMLTABLE","XMLTRANSFORM","DECODE","DUMP","ORA_HASH","VSIZE","COALESCE","LNNVL","NULLIF","NVL","NVL2","SYS_CONTEXT","SYS_GUID","SYS_TYPEID","UID","USER","USERENV","AVG","COLLECT","CORR","CORR_S","CORR_K","COUNT","COVAR_POP","COVAR_SAMP","CUME_DIST","DENSE_RANK","FIRST","GROUP_ID","GROUPING","GROUPING_ID","LAST","MAX","MEDIAN","MIN","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","RANK","REGR_SLOPE","REGR_INTERCEPT","REGR_COUNT","REGR_R2","REGR_AVGX","REGR_AVGY","REGR_SXX","REGR_SYY","REGR_SXY","STATS_BINOMIAL_TEST","STATS_CROSSTAB","STATS_F_TEST","STATS_KS_TEST","STATS_MODE","STATS_MW_TEST","STATS_ONE_WAY_ANOVA","STATS_T_TEST_ONE","STATS_T_TEST_PAIRED","STATS_T_TEST_INDEP","STATS_T_TEST_INDEPU","STATS_WSR_TEST","STDDEV","STDDEV_POP","STDDEV_SAMP","SUM","VAR_POP","VAR_SAMP","VARIANCE","FIRST_VALUE","LAG","LAST_VALUE","LEAD","NTILE","RATIO_TO_REPORT","ROW_NUMBER","DEREF","MAKE_REF","REF","REFTOHEX","VALUE","CV","ITERATION_NUMBER","PRESENTNNV","PRESENTV","PREVIOUS"],bS=v(["SELECT [ALL | DISTINCT | UNIQUE]"]),yS=v(["WITH","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER [SIBLINGS] BY","OFFSET","FETCH {FIRST | NEXT}","FOR UPDATE [OF]","INSERT [INTO | ALL INTO]","VALUES","SET","MERGE [INTO]","WHEN [NOT] MATCHED [THEN]","UPDATE SET","RETURNING"]),or=v(["CREATE [GLOBAL TEMPORARY | PRIVATE TEMPORARY | SHARDED | DUPLICATED | IMMUTABLE BLOCKCHAIN | BLOCKCHAIN | IMMUTABLE] TABLE"]),Qt=v(["CREATE [OR REPLACE] [NO FORCE | FORCE] [EDITIONING | EDITIONABLE | EDITIONABLE EDITIONING | NONEDITIONABLE] VIEW","CREATE MATERIALIZED VIEW","UPDATE [ONLY]","DELETE FROM [ONLY]","DROP TABLE","ALTER TABLE","ADD","DROP {COLUMN | UNUSED COLUMNS | COLUMNS CONTINUE}","MODIFY","RENAME TO","RENAME COLUMN","TRUNCATE TABLE","SET SCHEMA","BEGIN","CONNECT BY","DECLARE","EXCEPT","EXCEPTION","LOOP","START WITH"]),BS=v(["UNION [ALL]","EXCEPT","INTERSECT"]),vS=v(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN","{CROSS | OUTER} APPLY"]),FS=v(["ON {UPDATE | DELETE} [SET NULL]","ON COMMIT","{ROWS | RANGE} BETWEEN"]),YS={name:"plsql",tokenizerOptions:{reservedSelect:bS,reservedClauses:[...yS,...or,...Qt],reservedSetOperations:BS,reservedJoins:vS,reservedPhrases:FS,supportsXor:!0,reservedKeywords:GS,reservedDataTypes:gS,reservedFunctionNames:HS,stringTypes:[{quote:"''-qq",prefixes:["N"]},{quote:"q''",prefixes:["N"]}],identTypes:['""-qq'],identChars:{rest:"$#"},variableTypes:[{regex:"&{1,2}[A-Za-z][A-Za-z0-9_$#]*"}],paramTypes:{numbered:[":"],named:[":"]},paramChars:{},operators:["**",":=","%","~=","^=",">>","<<","=>","@","||"],postProcess:VS},formatOptions:{alwaysDenseOperators:["@"],onelineClauses:[...or,...Qt],tabularOnelineClauses:Qt}};function VS(E){let e=et;return E.map(T=>vE.SET(T)&&vE.BY(e)?AE(eE({},T),{type:"RESERVED_KEYWORD"}):(YR(T.type)&&(e=T),T))}var WS=["ABS","ACOS","ACOSD","ACOSH","ASIN","ASIND","ASINH","ATAN","ATAN2","ATAN2D","ATAND","ATANH","CBRT","CEIL","CEILING","COS","COSD","COSH","COT","COTD","DEGREES","DIV","EXP","FACTORIAL","FLOOR","GCD","LCM","LN","LOG","LOG10","MIN_SCALE","MOD","PI","POWER","RADIANS","RANDOM","ROUND","SCALE","SETSEED","SIGN","SIN","SIND","SINH","SQRT","TAN","TAND","TANH","TRIM_SCALE","TRUNC","WIDTH_BUCKET","ABS","ASCII","BIT_LENGTH","BTRIM","CHARACTER_LENGTH","CHAR_LENGTH","CHR","CONCAT","CONCAT_WS","FORMAT","INITCAP","LEFT","LENGTH","LOWER","LPAD","LTRIM","MD5","NORMALIZE","OCTET_LENGTH","OVERLAY","PARSE_IDENT","PG_CLIENT_ENCODING","POSITION","QUOTE_IDENT","QUOTE_LITERAL","QUOTE_NULLABLE","REGEXP_MATCH","REGEXP_MATCHES","REGEXP_REPLACE","REGEXP_SPLIT_TO_ARRAY","REGEXP_SPLIT_TO_TABLE","REPEAT","REPLACE","REVERSE","RIGHT","RPAD","RTRIM","SPLIT_PART","SPRINTF","STARTS_WITH","STRING_AGG","STRING_TO_ARRAY","STRING_TO_TABLE","STRPOS","SUBSTR","SUBSTRING","TO_ASCII","TO_HEX","TRANSLATE","TRIM","UNISTR","UPPER","BIT_COUNT","BIT_LENGTH","BTRIM","CONVERT","CONVERT_FROM","CONVERT_TO","DECODE","ENCODE","GET_BIT","GET_BYTE","LENGTH","LTRIM","MD5","OCTET_LENGTH","OVERLAY","POSITION","RTRIM","SET_BIT","SET_BYTE","SHA224","SHA256","SHA384","SHA512","STRING_AGG","SUBSTR","SUBSTRING","TRIM","BIT_COUNT","BIT_LENGTH","GET_BIT","LENGTH","OCTET_LENGTH","OVERLAY","POSITION","SET_BIT","SUBSTRING","REGEXP_MATCH","REGEXP_MATCHES","REGEXP_REPLACE","REGEXP_SPLIT_TO_ARRAY","REGEXP_SPLIT_TO_TABLE","TO_CHAR","TO_DATE","TO_NUMBER","TO_TIMESTAMP","CLOCK_TIMESTAMP","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATE_BIN","DATE_PART","DATE_TRUNC","EXTRACT","ISFINITE","JUSTIFY_DAYS","JUSTIFY_HOURS","JUSTIFY_INTERVAL","LOCALTIME","LOCALTIMESTAMP","MAKE_DATE","MAKE_INTERVAL","MAKE_TIME","MAKE_TIMESTAMP","MAKE_TIMESTAMPTZ","NOW","PG_SLEEP","PG_SLEEP_FOR","PG_SLEEP_UNTIL","STATEMENT_TIMESTAMP","TIMEOFDAY","TO_TIMESTAMP","TRANSACTION_TIMESTAMP","ENUM_FIRST","ENUM_LAST","ENUM_RANGE","AREA","BOUND_BOX","BOX","CENTER","CIRCLE","DIAGONAL","DIAMETER","HEIGHT","ISCLOSED","ISOPEN","LENGTH","LINE","LSEG","NPOINTS","PATH","PCLOSE","POINT","POLYGON","POPEN","RADIUS","SLOPE","WIDTH","ABBREV","BROADCAST","FAMILY","HOST","HOSTMASK","INET_MERGE","INET_SAME_FAMILY","MACADDR8_SET7BIT","MASKLEN","NETMASK","NETWORK","SET_MASKLEN","TRUNC","ARRAY_TO_TSVECTOR","GET_CURRENT_TS_CONFIG","JSONB_TO_TSVECTOR","JSON_TO_TSVECTOR","LENGTH","NUMNODE","PHRASETO_TSQUERY","PLAINTO_TSQUERY","QUERYTREE","SETWEIGHT","STRIP","TO_TSQUERY","TO_TSVECTOR","TSQUERY_PHRASE","TSVECTOR_TO_ARRAY","TS_DEBUG","TS_DELETE","TS_FILTER","TS_HEADLINE","TS_LEXIZE","TS_PARSE","TS_RANK","TS_RANK_CD","TS_REWRITE","TS_STAT","TS_TOKEN_TYPE","WEBSEARCH_TO_TSQUERY","UUID","CURSOR_TO_XML","CURSOR_TO_XMLSCHEMA","DATABASE_TO_XML","DATABASE_TO_XMLSCHEMA","DATABASE_TO_XML_AND_XMLSCHEMA","NEXTVAL","QUERY_TO_XML","QUERY_TO_XMLSCHEMA","QUERY_TO_XML_AND_XMLSCHEMA","SCHEMA_TO_XML","SCHEMA_TO_XMLSCHEMA","SCHEMA_TO_XML_AND_XMLSCHEMA","STRING","TABLE_TO_XML","TABLE_TO_XMLSCHEMA","TABLE_TO_XML_AND_XMLSCHEMA","XMLAGG","XMLCOMMENT","XMLCONCAT","XMLELEMENT","XMLEXISTS","XMLFOREST","XMLPARSE","XMLPI","XMLROOT","XMLSERIALIZE","XMLTABLE","XML_IS_WELL_FORMED","XML_IS_WELL_FORMED_CONTENT","XML_IS_WELL_FORMED_DOCUMENT","XPATH","XPATH_EXISTS","ARRAY_TO_JSON","JSONB_AGG","JSONB_ARRAY_ELEMENTS","JSONB_ARRAY_ELEMENTS_TEXT","JSONB_ARRAY_LENGTH","JSONB_BUILD_ARRAY","JSONB_BUILD_OBJECT","JSONB_EACH","JSONB_EACH_TEXT","JSONB_EXTRACT_PATH","JSONB_EXTRACT_PATH_TEXT","JSONB_INSERT","JSONB_OBJECT","JSONB_OBJECT_AGG","JSONB_OBJECT_KEYS","JSONB_PATH_EXISTS","JSONB_PATH_EXISTS_TZ","JSONB_PATH_MATCH","JSONB_PATH_MATCH_TZ","JSONB_PATH_QUERY","JSONB_PATH_QUERY_ARRAY","JSONB_PATH_QUERY_ARRAY_TZ","JSONB_PATH_QUERY_FIRST","JSONB_PATH_QUERY_FIRST_TZ","JSONB_PATH_QUERY_TZ","JSONB_POPULATE_RECORD","JSONB_POPULATE_RECORDSET","JSONB_PRETTY","JSONB_SET","JSONB_SET_LAX","JSONB_STRIP_NULLS","JSONB_TO_RECORD","JSONB_TO_RECORDSET","JSONB_TYPEOF","JSON_AGG","JSON_ARRAY_ELEMENTS","JSON_ARRAY_ELEMENTS_TEXT","JSON_ARRAY_LENGTH","JSON_BUILD_ARRAY","JSON_BUILD_OBJECT","JSON_EACH","JSON_EACH_TEXT","JSON_EXTRACT_PATH","JSON_EXTRACT_PATH_TEXT","JSON_OBJECT","JSON_OBJECT_AGG","JSON_OBJECT_KEYS","JSON_POPULATE_RECORD","JSON_POPULATE_RECORDSET","JSON_STRIP_NULLS","JSON_TO_RECORD","JSON_TO_RECORDSET","JSON_TYPEOF","ROW_TO_JSON","TO_JSON","TO_JSONB","TO_TIMESTAMP","CURRVAL","LASTVAL","NEXTVAL","SETVAL","COALESCE","GREATEST","LEAST","NULLIF","ARRAY_AGG","ARRAY_APPEND","ARRAY_CAT","ARRAY_DIMS","ARRAY_FILL","ARRAY_LENGTH","ARRAY_LOWER","ARRAY_NDIMS","ARRAY_POSITION","ARRAY_POSITIONS","ARRAY_PREPEND","ARRAY_REMOVE","ARRAY_REPLACE","ARRAY_TO_STRING","ARRAY_UPPER","CARDINALITY","STRING_TO_ARRAY","TRIM_ARRAY","UNNEST","ISEMPTY","LOWER","LOWER_INC","LOWER_INF","MULTIRANGE","RANGE_MERGE","UPPER","UPPER_INC","UPPER_INF","ARRAY_AGG","AVG","BIT_AND","BIT_OR","BIT_XOR","BOOL_AND","BOOL_OR","COALESCE","CORR","COUNT","COVAR_POP","COVAR_SAMP","CUME_DIST","DENSE_RANK","EVERY","GROUPING","JSONB_AGG","JSONB_OBJECT_AGG","JSON_AGG","JSON_OBJECT_AGG","MAX","MIN","MODE","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","RANGE_AGG","RANGE_INTERSECT_AGG","RANK","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","STDDEV","STDDEV_POP","STDDEV_SAMP","STRING_AGG","SUM","TO_JSON","TO_JSONB","VARIANCE","VAR_POP","VAR_SAMP","XMLAGG","CUME_DIST","DENSE_RANK","FIRST_VALUE","LAG","LAST_VALUE","LEAD","NTH_VALUE","NTILE","PERCENT_RANK","RANK","ROW_NUMBER","GENERATE_SERIES","GENERATE_SUBSCRIPTS","ACLDEFAULT","ACLEXPLODE","COL_DESCRIPTION","CURRENT_CATALOG","CURRENT_DATABASE","CURRENT_QUERY","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_SCHEMAS","CURRENT_USER","FORMAT_TYPE","HAS_ANY_COLUMN_PRIVILEGE","HAS_COLUMN_PRIVILEGE","HAS_DATABASE_PRIVILEGE","HAS_FOREIGN_DATA_WRAPPER_PRIVILEGE","HAS_FUNCTION_PRIVILEGE","HAS_LANGUAGE_PRIVILEGE","HAS_SCHEMA_PRIVILEGE","HAS_SEQUENCE_PRIVILEGE","HAS_SERVER_PRIVILEGE","HAS_TABLESPACE_PRIVILEGE","HAS_TABLE_PRIVILEGE","HAS_TYPE_PRIVILEGE","INET_CLIENT_ADDR","INET_CLIENT_PORT","INET_SERVER_ADDR","INET_SERVER_PORT","MAKEACLITEM","OBJ_DESCRIPTION","PG_BACKEND_PID","PG_BLOCKING_PIDS","PG_COLLATION_IS_VISIBLE","PG_CONF_LOAD_TIME","PG_CONTROL_CHECKPOINT","PG_CONTROL_INIT","PG_CONTROL_SYSTEM","PG_CONVERSION_IS_VISIBLE","PG_CURRENT_LOGFILE","PG_CURRENT_SNAPSHOT","PG_CURRENT_XACT_ID","PG_CURRENT_XACT_ID_IF_ASSIGNED","PG_DESCRIBE_OBJECT","PG_FUNCTION_IS_VISIBLE","PG_GET_CATALOG_FOREIGN_KEYS","PG_GET_CONSTRAINTDEF","PG_GET_EXPR","PG_GET_FUNCTIONDEF","PG_GET_FUNCTION_ARGUMENTS","PG_GET_FUNCTION_IDENTITY_ARGUMENTS","PG_GET_FUNCTION_RESULT","PG_GET_INDEXDEF","PG_GET_KEYWORDS","PG_GET_OBJECT_ADDRESS","PG_GET_OWNED_SEQUENCE","PG_GET_RULEDEF","PG_GET_SERIAL_SEQUENCE","PG_GET_STATISTICSOBJDEF","PG_GET_TRIGGERDEF","PG_GET_USERBYID","PG_GET_VIEWDEF","PG_HAS_ROLE","PG_IDENTIFY_OBJECT","PG_IDENTIFY_OBJECT_AS_ADDRESS","PG_INDEXAM_HAS_PROPERTY","PG_INDEX_COLUMN_HAS_PROPERTY","PG_INDEX_HAS_PROPERTY","PG_IS_OTHER_TEMP_SCHEMA","PG_JIT_AVAILABLE","PG_LAST_COMMITTED_XACT","PG_LISTENING_CHANNELS","PG_MY_TEMP_SCHEMA","PG_NOTIFICATION_QUEUE_USAGE","PG_OPCLASS_IS_VISIBLE","PG_OPERATOR_IS_VISIBLE","PG_OPFAMILY_IS_VISIBLE","PG_OPTIONS_TO_TABLE","PG_POSTMASTER_START_TIME","PG_SAFE_SNAPSHOT_BLOCKING_PIDS","PG_SNAPSHOT_XIP","PG_SNAPSHOT_XMAX","PG_SNAPSHOT_XMIN","PG_STATISTICS_OBJ_IS_VISIBLE","PG_TABLESPACE_DATABASES","PG_TABLESPACE_LOCATION","PG_TABLE_IS_VISIBLE","PG_TRIGGER_DEPTH","PG_TS_CONFIG_IS_VISIBLE","PG_TS_DICT_IS_VISIBLE","PG_TS_PARSER_IS_VISIBLE","PG_TS_TEMPLATE_IS_VISIBLE","PG_TYPEOF","PG_TYPE_IS_VISIBLE","PG_VISIBLE_IN_SNAPSHOT","PG_XACT_COMMIT_TIMESTAMP","PG_XACT_COMMIT_TIMESTAMP_ORIGIN","PG_XACT_STATUS","PQSERVERVERSION","ROW_SECURITY_ACTIVE","SESSION_USER","SHOBJ_DESCRIPTION","TO_REGCLASS","TO_REGCOLLATION","TO_REGNAMESPACE","TO_REGOPER","TO_REGOPERATOR","TO_REGPROC","TO_REGPROCEDURE","TO_REGROLE","TO_REGTYPE","TXID_CURRENT","TXID_CURRENT_IF_ASSIGNED","TXID_CURRENT_SNAPSHOT","TXID_SNAPSHOT_XIP","TXID_SNAPSHOT_XMAX","TXID_SNAPSHOT_XMIN","TXID_STATUS","TXID_VISIBLE_IN_SNAPSHOT","USER","VERSION","BRIN_DESUMMARIZE_RANGE","BRIN_SUMMARIZE_NEW_VALUES","BRIN_SUMMARIZE_RANGE","CONVERT_FROM","CURRENT_SETTING","GIN_CLEAN_PENDING_LIST","PG_ADVISORY_LOCK","PG_ADVISORY_LOCK_SHARED","PG_ADVISORY_UNLOCK","PG_ADVISORY_UNLOCK_ALL","PG_ADVISORY_UNLOCK_SHARED","PG_ADVISORY_XACT_LOCK","PG_ADVISORY_XACT_LOCK_SHARED","PG_BACKUP_START_TIME","PG_CANCEL_BACKEND","PG_COLLATION_ACTUAL_VERSION","PG_COLUMN_COMPRESSION","PG_COLUMN_SIZE","PG_COPY_LOGICAL_REPLICATION_SLOT","PG_COPY_PHYSICAL_REPLICATION_SLOT","PG_CREATE_LOGICAL_REPLICATION_SLOT","PG_CREATE_PHYSICAL_REPLICATION_SLOT","PG_CREATE_RESTORE_POINT","PG_CURRENT_WAL_FLUSH_LSN","PG_CURRENT_WAL_INSERT_LSN","PG_CURRENT_WAL_LSN","PG_DATABASE_SIZE","PG_DROP_REPLICATION_SLOT","PG_EXPORT_SNAPSHOT","PG_FILENODE_RELATION","PG_GET_WAL_REPLAY_PAUSE_STATE","PG_IMPORT_SYSTEM_COLLATIONS","PG_INDEXES_SIZE","PG_IS_IN_BACKUP","PG_IS_IN_RECOVERY","PG_IS_WAL_REPLAY_PAUSED","PG_LAST_WAL_RECEIVE_LSN","PG_LAST_WAL_REPLAY_LSN","PG_LAST_XACT_REPLAY_TIMESTAMP","PG_LOGICAL_EMIT_MESSAGE","PG_LOGICAL_SLOT_GET_BINARY_CHANGES","PG_LOGICAL_SLOT_GET_CHANGES","PG_LOGICAL_SLOT_PEEK_BINARY_CHANGES","PG_LOGICAL_SLOT_PEEK_CHANGES","PG_LOG_BACKEND_MEMORY_CONTEXTS","PG_LS_ARCHIVE_STATUSDIR","PG_LS_DIR","PG_LS_LOGDIR","PG_LS_TMPDIR","PG_LS_WALDIR","PG_PARTITION_ANCESTORS","PG_PARTITION_ROOT","PG_PARTITION_TREE","PG_PROMOTE","PG_READ_BINARY_FILE","PG_READ_FILE","PG_RELATION_FILENODE","PG_RELATION_FILEPATH","PG_RELATION_SIZE","PG_RELOAD_CONF","PG_REPLICATION_ORIGIN_ADVANCE","PG_REPLICATION_ORIGIN_CREATE","PG_REPLICATION_ORIGIN_DROP","PG_REPLICATION_ORIGIN_OID","PG_REPLICATION_ORIGIN_PROGRESS","PG_REPLICATION_ORIGIN_SESSION_IS_SETUP","PG_REPLICATION_ORIGIN_SESSION_PROGRESS","PG_REPLICATION_ORIGIN_SESSION_RESET","PG_REPLICATION_ORIGIN_SESSION_SETUP","PG_REPLICATION_ORIGIN_XACT_RESET","PG_REPLICATION_ORIGIN_XACT_SETUP","PG_REPLICATION_SLOT_ADVANCE","PG_ROTATE_LOGFILE","PG_SIZE_BYTES","PG_SIZE_PRETTY","PG_START_BACKUP","PG_STAT_FILE","PG_STOP_BACKUP","PG_SWITCH_WAL","PG_TABLESPACE_SIZE","PG_TABLE_SIZE","PG_TERMINATE_BACKEND","PG_TOTAL_RELATION_SIZE","PG_TRY_ADVISORY_LOCK","PG_TRY_ADVISORY_LOCK_SHARED","PG_TRY_ADVISORY_XACT_LOCK","PG_TRY_ADVISORY_XACT_LOCK_SHARED","PG_WALFILE_NAME","PG_WALFILE_NAME_OFFSET","PG_WAL_LSN_DIFF","PG_WAL_REPLAY_PAUSE","PG_WAL_REPLAY_RESUME","SET_CONFIG","SUPPRESS_REDUNDANT_UPDATES_TRIGGER","TSVECTOR_UPDATE_TRIGGER","TSVECTOR_UPDATE_TRIGGER_COLUMN","PG_EVENT_TRIGGER_DDL_COMMANDS","PG_EVENT_TRIGGER_DROPPED_OBJECTS","PG_EVENT_TRIGGER_TABLE_REWRITE_OID","PG_EVENT_TRIGGER_TABLE_REWRITE_REASON","PG_GET_OBJECT_ADDRESS","PG_MCV_LIST_ITEMS","CAST"],wS=["ALL","ANALYSE","ANALYZE","AND","ANY","AS","ASC","ASYMMETRIC","AUTHORIZATION","BETWEEN","BINARY","BOTH","CASE","CAST","CHECK","COLLATE","COLLATION","COLUMN","CONCURRENTLY","CONSTRAINT","CREATE","CROSS","CURRENT_CATALOG","CURRENT_DATE","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","DAY","DEFAULT","DEFERRABLE","DESC","DISTINCT","DO","ELSE","END","EXCEPT","EXISTS","FALSE","FETCH","FILTER","FOR","FOREIGN","FREEZE","FROM","FULL","GRANT","GROUP","HAVING","HOUR","ILIKE","IN","INITIALLY","INNER","INOUT","INTERSECT","INTO","IS","ISNULL","JOIN","LATERAL","LEADING","LEFT","LIKE","LIMIT","LOCALTIME","LOCALTIMESTAMP","MINUTE","MONTH","NATURAL","NOT","NOTNULL","NULL","NULLIF","OFFSET","ON","ONLY","OR","ORDER","OUT","OUTER","OVER","OVERLAPS","PLACING","PRIMARY","REFERENCES","RETURNING","RIGHT","ROW","SECOND","SELECT","SESSION_USER","SIMILAR","SOME","SYMMETRIC","TABLE","TABLESAMPLE","THEN","TO","TRAILING","TRUE","UNION","UNIQUE","USER","USING","VALUES","VARIADIC","VERBOSE","WHEN","WHERE","WINDOW","WITH","WITHIN","WITHOUT","YEAR"],xS=["ARRAY","BIGINT","BIT","BIT VARYING","BOOL","BOOLEAN","CHAR","CHARACTER","CHARACTER VARYING","DECIMAL","DEC","DOUBLE","ENUM","FLOAT","INT","INTEGER","INTERVAL","NCHAR","NUMERIC","PRECISION","REAL","SMALLINT","TEXT","TIME","TIMESTAMP","TIMESTAMPTZ","VARCHAR","XML","ZONE"],$S=v(["SELECT [ALL | DISTINCT]"]),XS=v(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY [ALL | DISTINCT]","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","FETCH {FIRST | NEXT}","FOR {UPDATE | NO KEY UPDATE | SHARE | KEY SHARE} [OF]","INSERT INTO","VALUES","DEFAULT VALUES","SET","RETURNING"]),Or=v(["CREATE [GLOBAL | LOCAL] [TEMPORARY | TEMP | UNLOGGED] TABLE [IF NOT EXISTS]"]),Zt=v(["CREATE [OR REPLACE] [TEMP | TEMPORARY] [RECURSIVE] VIEW","CREATE [MATERIALIZED] VIEW [IF NOT EXISTS]","UPDATE [ONLY]","WHERE CURRENT OF","ON CONFLICT","DELETE FROM [ONLY]","DROP TABLE [IF EXISTS]","ALTER TABLE [IF EXISTS] [ONLY]","ALTER TABLE ALL IN TABLESPACE","RENAME [COLUMN]","RENAME TO","ADD [COLUMN] [IF NOT EXISTS]","DROP [COLUMN] [IF EXISTS]","ALTER [COLUMN]","SET DATA TYPE","{SET | DROP} DEFAULT","{SET | DROP} NOT NULL","TRUNCATE [TABLE] [ONLY]","SET SCHEMA","AFTER","ABORT","ALTER AGGREGATE","ALTER COLLATION","ALTER CONVERSION","ALTER DATABASE","ALTER DEFAULT PRIVILEGES","ALTER DOMAIN","ALTER EVENT TRIGGER","ALTER EXTENSION","ALTER FOREIGN DATA WRAPPER","ALTER FOREIGN TABLE","ALTER FUNCTION","ALTER GROUP","ALTER INDEX","ALTER LANGUAGE","ALTER LARGE OBJECT","ALTER MATERIALIZED VIEW","ALTER OPERATOR","ALTER OPERATOR CLASS","ALTER OPERATOR FAMILY","ALTER POLICY","ALTER PROCEDURE","ALTER PUBLICATION","ALTER ROLE","ALTER ROUTINE","ALTER RULE","ALTER SCHEMA","ALTER SEQUENCE","ALTER SERVER","ALTER STATISTICS","ALTER SUBSCRIPTION","ALTER SYSTEM","ALTER TABLESPACE","ALTER TEXT SEARCH CONFIGURATION","ALTER TEXT SEARCH DICTIONARY","ALTER TEXT SEARCH PARSER","ALTER TEXT SEARCH TEMPLATE","ALTER TRIGGER","ALTER TYPE","ALTER USER","ALTER USER MAPPING","ALTER VIEW","ANALYZE","BEGIN","CALL","CHECKPOINT","CLOSE","CLUSTER","COMMIT","COMMIT PREPARED","COPY","CREATE ACCESS METHOD","CREATE AGGREGATE","CREATE CAST","CREATE COLLATION","CREATE CONVERSION","CREATE DATABASE","CREATE DOMAIN","CREATE EVENT TRIGGER","CREATE EXTENSION","CREATE FOREIGN DATA WRAPPER","CREATE FOREIGN TABLE","CREATE FUNCTION","CREATE GROUP","CREATE INDEX","CREATE LANGUAGE","CREATE OPERATOR","CREATE OPERATOR CLASS","CREATE OPERATOR FAMILY","CREATE POLICY","CREATE PROCEDURE","CREATE PUBLICATION","CREATE ROLE","CREATE RULE","CREATE SCHEMA","CREATE SEQUENCE","CREATE SERVER","CREATE STATISTICS","CREATE SUBSCRIPTION","CREATE TABLESPACE","CREATE TEXT SEARCH CONFIGURATION","CREATE TEXT SEARCH DICTIONARY","CREATE TEXT SEARCH PARSER","CREATE TEXT SEARCH TEMPLATE","CREATE TRANSFORM","CREATE TRIGGER","CREATE TYPE","CREATE USER","CREATE USER MAPPING","DEALLOCATE","DECLARE","DISCARD","DROP ACCESS METHOD","DROP AGGREGATE","DROP CAST","DROP COLLATION","DROP CONVERSION","DROP DATABASE","DROP DOMAIN","DROP EVENT TRIGGER","DROP EXTENSION","DROP FOREIGN DATA WRAPPER","DROP FOREIGN TABLE","DROP FUNCTION","DROP GROUP","DROP INDEX","DROP LANGUAGE","DROP MATERIALIZED VIEW","DROP OPERATOR","DROP OPERATOR CLASS","DROP OPERATOR FAMILY","DROP OWNED","DROP POLICY","DROP PROCEDURE","DROP PUBLICATION","DROP ROLE","DROP ROUTINE","DROP RULE","DROP SCHEMA","DROP SEQUENCE","DROP SERVER","DROP STATISTICS","DROP SUBSCRIPTION","DROP TABLESPACE","DROP TEXT SEARCH CONFIGURATION","DROP TEXT SEARCH DICTIONARY","DROP TEXT SEARCH PARSER","DROP TEXT SEARCH TEMPLATE","DROP TRANSFORM","DROP TRIGGER","DROP TYPE","DROP USER","DROP USER MAPPING","DROP VIEW","EXECUTE","EXPLAIN","FETCH","GRANT","IMPORT FOREIGN SCHEMA","LISTEN","LOAD","LOCK","MOVE","NOTIFY","PREPARE","PREPARE TRANSACTION","REASSIGN OWNED","REFRESH MATERIALIZED VIEW","REINDEX","RELEASE SAVEPOINT","RESET","REVOKE","ROLLBACK","ROLLBACK PREPARED","ROLLBACK TO SAVEPOINT","SAVEPOINT","SECURITY LABEL","SELECT INTO","SET CONSTRAINTS","SET ROLE","SET SESSION AUTHORIZATION","SET TRANSACTION","SHOW","START TRANSACTION","UNLISTEN","VACUUM"]),kS=v(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),KS=v(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),JS=v(["PRIMARY KEY","GENERATED {ALWAYS | BY DEFAULT} AS IDENTITY","ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE | GROUPS} BETWEEN","[TIMESTAMP | TIME] {WITH | WITHOUT} TIME ZONE","IS [NOT] DISTINCT FROM"]),qS={name:"postgresql",tokenizerOptions:{reservedSelect:$S,reservedClauses:[...XS,...Or,...Zt],reservedSetOperations:kS,reservedJoins:KS,reservedPhrases:JS,reservedKeywords:wS,reservedDataTypes:xS,reservedFunctionNames:WS,nestedBlockComments:!0,extraParens:["[]"],stringTypes:["$$",{quote:"''-qq",prefixes:["U&"]},{quote:"''-qq-bs",prefixes:["E"],requirePrefix:!0},{quote:"''-raw",prefixes:["B","X"],requirePrefix:!0}],identTypes:[{quote:'""-qq',prefixes:["U&"]}],identChars:{rest:"$"},paramTypes:{numbered:["$"]},operators:["%","^","|/","||/","@",":=","&","|","#","~","<<",">>","~>~","~<~","~>=~","~<=~","@-@","@@","##","<->","&&","&<","&>","<<|","&<|","|>>","|&>","<^","^>","?#","?-","?|","?-|","?||","@>","<@","~=","?","@?","?&","->","->>","#>","#>>","#-","=>",">>=","<<=","~~","~~*","!~~","!~~*","~","~*","!~","!~*","-|-","||","@@@","!!","^@","<%","%>","<<%","%>>","<<->","<->>","<<<->","<->>>","::",":"]},formatOptions:{alwaysDenseOperators:["::",":"],onelineClauses:[...Or,...Zt],tabularOnelineClauses:Zt}},QS=["ANY_VALUE","APPROXIMATE PERCENTILE_DISC","AVG","COUNT","LISTAGG","MAX","MEDIAN","MIN","PERCENTILE_CONT","STDDEV_SAMP","STDDEV_POP","SUM","VAR_SAMP","VAR_POP","array","array_concat","array_flatten","get_array_length","split_to_array","subarray","BIT_AND","BIT_OR","BOOL_AND","BOOL_OR","COALESCE","DECODE","GREATEST","LEAST","NVL","NVL2","NULLIF","ADD_MONTHS","AT TIME ZONE","CONVERT_TIMEZONE","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATE_CMP","DATE_CMP_TIMESTAMP","DATE_CMP_TIMESTAMPTZ","DATE_PART_YEAR","DATEADD","DATEDIFF","DATE_PART","DATE_TRUNC","EXTRACT","GETDATE","INTERVAL_CMP","LAST_DAY","MONTHS_BETWEEN","NEXT_DAY","SYSDATE","TIMEOFDAY","TIMESTAMP_CMP","TIMESTAMP_CMP_DATE","TIMESTAMP_CMP_TIMESTAMPTZ","TIMESTAMPTZ_CMP","TIMESTAMPTZ_CMP_DATE","TIMESTAMPTZ_CMP_TIMESTAMP","TIMEZONE","TO_TIMESTAMP","TRUNC","AddBBox","DropBBox","GeometryType","ST_AddPoint","ST_Angle","ST_Area","ST_AsBinary","ST_AsEWKB","ST_AsEWKT","ST_AsGeoJSON","ST_AsText","ST_Azimuth","ST_Boundary","ST_Collect","ST_Contains","ST_ContainsProperly","ST_ConvexHull","ST_CoveredBy","ST_Covers","ST_Crosses","ST_Dimension","ST_Disjoint","ST_Distance","ST_DistanceSphere","ST_DWithin","ST_EndPoint","ST_Envelope","ST_Equals","ST_ExteriorRing","ST_Force2D","ST_Force3D","ST_Force3DM","ST_Force3DZ","ST_Force4D","ST_GeometryN","ST_GeometryType","ST_GeomFromEWKB","ST_GeomFromEWKT","ST_GeomFromText","ST_GeomFromWKB","ST_InteriorRingN","ST_Intersects","ST_IsPolygonCCW","ST_IsPolygonCW","ST_IsClosed","ST_IsCollection","ST_IsEmpty","ST_IsSimple","ST_IsValid","ST_Length","ST_LengthSphere","ST_Length2D","ST_LineFromMultiPoint","ST_LineInterpolatePoint","ST_M","ST_MakeEnvelope","ST_MakeLine","ST_MakePoint","ST_MakePolygon","ST_MemSize","ST_MMax","ST_MMin","ST_Multi","ST_NDims","ST_NPoints","ST_NRings","ST_NumGeometries","ST_NumInteriorRings","ST_NumPoints","ST_Perimeter","ST_Perimeter2D","ST_Point","ST_PointN","ST_Points","ST_Polygon","ST_RemovePoint","ST_Reverse","ST_SetPoint","ST_SetSRID","ST_Simplify","ST_SRID","ST_StartPoint","ST_Touches","ST_Within","ST_X","ST_XMax","ST_XMin","ST_Y","ST_YMax","ST_YMin","ST_Z","ST_ZMax","ST_ZMin","SupportsBBox","CHECKSUM","FUNC_SHA1","FNV_HASH","MD5","SHA","SHA1","SHA2","HLL","HLL_CREATE_SKETCH","HLL_CARDINALITY","HLL_COMBINE","IS_VALID_JSON","IS_VALID_JSON_ARRAY","JSON_ARRAY_LENGTH","JSON_EXTRACT_ARRAY_ELEMENT_TEXT","JSON_EXTRACT_PATH_TEXT","JSON_PARSE","JSON_SERIALIZE","ABS","ACOS","ASIN","ATAN","ATAN2","CBRT","CEILING","CEIL","COS","COT","DEGREES","DEXP","DLOG1","DLOG10","EXP","FLOOR","LN","LOG","MOD","PI","POWER","RADIANS","RANDOM","ROUND","SIN","SIGN","SQRT","TAN","TO_HEX","TRUNC","EXPLAIN_MODEL","ASCII","BPCHARCMP","BTRIM","BTTEXT_PATTERN_CMP","CHAR_LENGTH","CHARACTER_LENGTH","CHARINDEX","CHR","COLLATE","CONCAT","CRC32","DIFFERENCE","INITCAP","LEFT","RIGHT","LEN","LENGTH","LOWER","LPAD","RPAD","LTRIM","OCTETINDEX","OCTET_LENGTH","POSITION","QUOTE_IDENT","QUOTE_LITERAL","REGEXP_COUNT","REGEXP_INSTR","REGEXP_REPLACE","REGEXP_SUBSTR","REPEAT","REPLACE","REPLICATE","REVERSE","RTRIM","SOUNDEX","SPLIT_PART","STRPOS","STRTOL","SUBSTRING","TEXTLEN","TRANSLATE","TRIM","UPPER","decimal_precision","decimal_scale","is_array","is_bigint","is_boolean","is_char","is_decimal","is_float","is_integer","is_object","is_scalar","is_smallint","is_varchar","json_typeof","AVG","COUNT","CUME_DIST","DENSE_RANK","FIRST_VALUE","LAST_VALUE","LAG","LEAD","LISTAGG","MAX","MEDIAN","MIN","NTH_VALUE","NTILE","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","RANK","RATIO_TO_REPORT","ROW_NUMBER","STDDEV_SAMP","STDDEV_POP","SUM","VAR_SAMP","VAR_POP","CAST","CONVERT","TO_CHAR","TO_DATE","TO_NUMBER","TEXT_TO_INT_ALT","TEXT_TO_NUMERIC_ALT","CHANGE_QUERY_PRIORITY","CHANGE_SESSION_PRIORITY","CHANGE_USER_PRIORITY","CURRENT_SETTING","PG_CANCEL_BACKEND","PG_TERMINATE_BACKEND","REBOOT_CLUSTER","SET_CONFIG","CURRENT_AWS_ACCOUNT","CURRENT_DATABASE","CURRENT_NAMESPACE","CURRENT_SCHEMA","CURRENT_SCHEMAS","CURRENT_USER","CURRENT_USER_ID","HAS_ASSUMEROLE_PRIVILEGE","HAS_DATABASE_PRIVILEGE","HAS_SCHEMA_PRIVILEGE","HAS_TABLE_PRIVILEGE","PG_BACKEND_PID","PG_GET_COLS","PG_GET_GRANTEE_BY_IAM_ROLE","PG_GET_IAM_ROLE_BY_USER","PG_GET_LATE_BINDING_VIEW_COLS","PG_LAST_COPY_COUNT","PG_LAST_COPY_ID","PG_LAST_UNLOAD_ID","PG_LAST_QUERY_ID","PG_LAST_UNLOAD_COUNT","SESSION_USER","SLICE_NUM","USER","VERSION"],ZS=["AES128","AES256","ALL","ALLOWOVERWRITE","ANY","AS","ASC","AUTHORIZATION","BACKUP","BETWEEN","BINARY","BOTH","CHECK","COLUMN","CONSTRAINT","CREATE","CROSS","DEFAULT","DEFERRABLE","DEFLATE","DEFRAG","DESC","DISABLE","DISTINCT","DO","ENABLE","ENCODE","ENCRYPT","ENCRYPTION","EXPLICIT","FALSE","FOR","FOREIGN","FREEZE","FROM","FULL","GLOBALDICT256","GLOBALDICT64K","GROUP","IDENTITY","IGNORE","ILIKE","IN","INITIALLY","INNER","INTO","IS","ISNULL","LANGUAGE","LEADING","LIKE","LIMIT","LOCALTIME","LOCALTIMESTAMP","LUN","LUNS","MINUS","NATURAL","NEW","NOT","NOTNULL","NULL","NULLS","OFF","OFFLINE","OFFSET","OID","OLD","ON","ONLY","OPEN","ORDER","OUTER","OVERLAPS","PARALLEL","PARTITION","PERCENT","PERMISSIONS","PLACING","PRIMARY","RECOVER","REFERENCES","REJECTLOG","RESORT","RESPECT","RESTORE","SIMILAR","SNAPSHOT","SOME","SYSTEM","TABLE","TAG","TDES","THEN","TIMESTAMP","TO","TOP","TRAILING","TRUE","UNIQUE","USING","VERBOSE","WALLET","WITHOUT","ACCEPTANYDATE","ACCEPTINVCHARS","BLANKSASNULL","DATEFORMAT","EMPTYASNULL","ENCODING","ESCAPE","EXPLICIT_IDS","FILLRECORD","IGNOREBLANKLINES","IGNOREHEADER","REMOVEQUOTES","ROUNDEC","TIMEFORMAT","TRIMBLANKS","TRUNCATECOLUMNS","COMPROWS","COMPUPDATE","MAXERROR","NOLOAD","STATUPDATE","FORMAT","CSV","DELIMITER","FIXEDWIDTH","SHAPEFILE","AVRO","JSON","PARQUET","ORC","ACCESS_KEY_ID","CREDENTIALS","ENCRYPTED","IAM_ROLE","MASTER_SYMMETRIC_KEY","SECRET_ACCESS_KEY","SESSION_TOKEN","BZIP2","GZIP","LZOP","ZSTD","MANIFEST","READRATIO","REGION","SSH","RAW","AZ64","BYTEDICT","DELTA","DELTA32K","LZO","MOSTLY8","MOSTLY16","MOSTLY32","RUNLENGTH","TEXT255","TEXT32K","CATALOG_ROLE","SECRET_ARN","EXTERNAL","AUTO","EVEN","KEY","PREDICATE","COMPRESSION"],jS=["ARRAY","BIGINT","BPCHAR","CHAR","CHARACTER VARYING","CHARACTER","DECIMAL","INT","INT2","INT4","INT8","INTEGER","NCHAR","NUMERIC","NVARCHAR","SMALLINT","TEXT","VARBYTE","VARCHAR"],zS=v(["SELECT [ALL | DISTINCT]"]),eo=v(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT INTO","VALUES","SET"]),ir=v(["CREATE [TEMPORARY | TEMP | LOCAL TEMPORARY | LOCAL TEMP] TABLE [IF NOT EXISTS]"]),jt=v(["CREATE [OR REPLACE | MATERIALIZED] VIEW","UPDATE","DELETE [FROM]","DROP TABLE [IF EXISTS]","ALTER TABLE","ALTER TABLE APPEND","ADD [COLUMN]","DROP [COLUMN]","RENAME TO","RENAME COLUMN","ALTER COLUMN","TYPE","ENCODE","TRUNCATE [TABLE]","ABORT","ALTER DATABASE","ALTER DATASHARE","ALTER DEFAULT PRIVILEGES","ALTER GROUP","ALTER MATERIALIZED VIEW","ALTER PROCEDURE","ALTER SCHEMA","ALTER USER","ANALYSE","ANALYZE","ANALYSE COMPRESSION","ANALYZE COMPRESSION","BEGIN","CALL","CANCEL","CLOSE","COMMIT","COPY","CREATE DATABASE","CREATE DATASHARE","CREATE EXTERNAL FUNCTION","CREATE EXTERNAL SCHEMA","CREATE EXTERNAL TABLE","CREATE FUNCTION","CREATE GROUP","CREATE LIBRARY","CREATE MODEL","CREATE PROCEDURE","CREATE SCHEMA","CREATE USER","DEALLOCATE","DECLARE","DESC DATASHARE","DROP DATABASE","DROP DATASHARE","DROP FUNCTION","DROP GROUP","DROP LIBRARY","DROP MODEL","DROP MATERIALIZED VIEW","DROP PROCEDURE","DROP SCHEMA","DROP USER","DROP VIEW","DROP","EXECUTE","EXPLAIN","FETCH","GRANT","LOCK","PREPARE","REFRESH MATERIALIZED VIEW","RESET","REVOKE","ROLLBACK","SELECT INTO","SET SESSION AUTHORIZATION","SET SESSION CHARACTERISTICS","SHOW","SHOW EXTERNAL TABLE","SHOW MODEL","SHOW DATASHARES","SHOW PROCEDURE","SHOW TABLE","SHOW VIEW","START TRANSACTION","UNLOAD","VACUUM"]),Eo=v(["UNION [ALL]","EXCEPT","INTERSECT","MINUS"]),to=v(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),To=v(["NULL AS","DATA CATALOG","HIVE METASTORE","{ROWS | RANGE} BETWEEN"]),ro={name:"redshift",tokenizerOptions:{reservedSelect:zS,reservedClauses:[...eo,...ir,...jt],reservedSetOperations:Eo,reservedJoins:to,reservedPhrases:To,reservedKeywords:ZS,reservedDataTypes:jS,reservedFunctionNames:QS,stringTypes:["''-qq"],identTypes:['""-qq'],identChars:{first:"#"},paramTypes:{numbered:["$"]},operators:["^","%","@","|/","||/","&","|","~","<<",">>","||","::"]},formatOptions:{alwaysDenseOperators:["::"],onelineClauses:[...ir,...jt],tabularOnelineClauses:jt}},Ro=["ADD","AFTER","ALL","ALTER","ANALYZE","AND","ANTI","ANY","ARCHIVE","AS","ASC","AT","AUTHORIZATION","BETWEEN","BOTH","BUCKET","BUCKETS","BY","CACHE","CASCADE","CAST","CHANGE","CHECK","CLEAR","CLUSTER","CLUSTERED","CODEGEN","COLLATE","COLLECTION","COLUMN","COLUMNS","COMMENT","COMMIT","COMPACT","COMPACTIONS","COMPUTE","CONCATENATE","CONSTRAINT","COST","CREATE","CROSS","CUBE","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","DATA","DATABASE","DATABASES","DAY","DBPROPERTIES","DEFINED","DELETE","DELIMITED","DESC","DESCRIBE","DFS","DIRECTORIES","DIRECTORY","DISTINCT","DISTRIBUTE","DIV","DROP","ESCAPE","ESCAPED","EXCEPT","EXCHANGE","EXISTS","EXPORT","EXTENDED","EXTERNAL","EXTRACT","FALSE","FETCH","FIELDS","FILTER","FILEFORMAT","FIRST","FIRST_VALUE","FOLLOWING","FOR","FOREIGN","FORMAT","FORMATTED","FULL","FUNCTION","FUNCTIONS","GLOBAL","GRANT","GROUP","GROUPING","HOUR","IF","IGNORE","IMPORT","IN","INDEX","INDEXES","INNER","INPATH","INPUTFORMAT","INTERSECT","INTO","IS","ITEMS","KEYS","LAST","LAST_VALUE","LATERAL","LAZY","LEADING","LEFT","LIKE","LINES","LIST","LOCAL","LOCATION","LOCK","LOCKS","LOGICAL","MACRO","MATCHED","MERGE","MINUTE","MONTH","MSCK","NAMESPACE","NAMESPACES","NATURAL","NO","NOT","NULL","NULLS","OF","ONLY","OPTION","OPTIONS","OR","ORDER","OUT","OUTER","OUTPUTFORMAT","OVER","OVERLAPS","OVERLAY","OVERWRITE","OWNER","PARTITION","PARTITIONED","PARTITIONS","PERCENT","PLACING","POSITION","PRECEDING","PRIMARY","PRINCIPALS","PROPERTIES","PURGE","QUERY","RANGE","RECORDREADER","RECORDWRITER","RECOVER","REDUCE","REFERENCES","RENAME","REPAIR","REPLACE","RESPECT","RESTRICT","REVOKE","RIGHT","RLIKE","ROLE","ROLES","ROLLBACK","ROLLUP","ROW","ROWS","SCHEMA","SECOND","SELECT","SEMI","SEPARATED","SERDE","SERDEPROPERTIES","SESSION_USER","SETS","SHOW","SKEWED","SOME","SORT","SORTED","START","STATISTICS","STORED","STRATIFY","SUBSTR","SUBSTRING","TABLE","TABLES","TBLPROPERTIES","TEMPORARY","TERMINATED","THEN","TO","TOUCH","TRAILING","TRANSACTION","TRANSACTIONS","TRIM","TRUE","TRUNCATE","UNARCHIVE","UNBOUNDED","UNCACHE","UNIQUE","UNKNOWN","UNLOCK","UNSET","USE","USER","USING","VIEW","WINDOW","YEAR","ANALYSE","ARRAY_ZIP","COALESCE","CONTAINS","CONVERT","DAYS","DAY_HOUR","DAY_MINUTE","DAY_SECOND","DECODE","DEFAULT","DISTINCTROW","ENCODE","EXPLODE","EXPLODE_OUTER","FIXED","GREATEST","GROUP_CONCAT","HOURS","HOUR_MINUTE","HOUR_SECOND","IFNULL","LEAST","LEVEL","MINUTE_SECOND","NULLIF","OFFSET","ON","OPTIMIZE","REGEXP","SEPARATOR","SIZE","TYPE","TYPES","UNSIGNED","VARIABLES","YEAR_MONTH"],no=["ARRAY","BIGINT","BINARY","BOOLEAN","BYTE","CHAR","DATE","DEC","DECIMAL","DOUBLE","FLOAT","INT","INTEGER","INTERVAL","LONG","MAP","NUMERIC","REAL","SHORT","SMALLINT","STRING","STRUCT","TIMESTAMP_LTZ","TIMESTAMP_NTZ","TIMESTAMP","TINYINT","VARCHAR"],Ao=["APPROX_COUNT_DISTINCT","APPROX_PERCENTILE","AVG","BIT_AND","BIT_OR","BIT_XOR","BOOL_AND","BOOL_OR","COLLECT_LIST","COLLECT_SET","CORR","COUNT","COUNT","COUNT","COUNT_IF","COUNT_MIN_SKETCH","COVAR_POP","COVAR_SAMP","EVERY","FIRST","FIRST_VALUE","GROUPING","GROUPING_ID","KURTOSIS","LAST","LAST_VALUE","MAX","MAX_BY","MEAN","MIN","MIN_BY","PERCENTILE","PERCENTILE","PERCENTILE_APPROX","SKEWNESS","STD","STDDEV","STDDEV_POP","STDDEV_SAMP","SUM","VAR_POP","VAR_SAMP","VARIANCE","CUME_DIST","DENSE_RANK","LAG","LEAD","NTH_VALUE","NTILE","PERCENT_RANK","RANK","ROW_NUMBER","ARRAY","ARRAY_CONTAINS","ARRAY_DISTINCT","ARRAY_EXCEPT","ARRAY_INTERSECT","ARRAY_JOIN","ARRAY_MAX","ARRAY_MIN","ARRAY_POSITION","ARRAY_REMOVE","ARRAY_REPEAT","ARRAY_UNION","ARRAYS_OVERLAP","ARRAYS_ZIP","FLATTEN","SEQUENCE","SHUFFLE","SLICE","SORT_ARRAY","ELEMENT_AT","ELEMENT_AT","MAP_CONCAT","MAP_ENTRIES","MAP_FROM_ARRAYS","MAP_FROM_ENTRIES","MAP_KEYS","MAP_VALUES","STR_TO_MAP","ADD_MONTHS","CURRENT_DATE","CURRENT_DATE","CURRENT_TIMESTAMP","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","DATE_ADD","DATE_FORMAT","DATE_FROM_UNIX_DATE","DATE_PART","DATE_SUB","DATE_TRUNC","DATEDIFF","DAY","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","EXTRACT","FROM_UNIXTIME","FROM_UTC_TIMESTAMP","HOUR","LAST_DAY","MAKE_DATE","MAKE_DT_INTERVAL","MAKE_INTERVAL","MAKE_TIMESTAMP","MAKE_YM_INTERVAL","MINUTE","MONTH","MONTHS_BETWEEN","NEXT_DAY","NOW","QUARTER","SECOND","SESSION_WINDOW","TIMESTAMP_MICROS","TIMESTAMP_MILLIS","TIMESTAMP_SECONDS","TO_DATE","TO_TIMESTAMP","TO_UNIX_TIMESTAMP","TO_UTC_TIMESTAMP","TRUNC","UNIX_DATE","UNIX_MICROS","UNIX_MILLIS","UNIX_SECONDS","UNIX_TIMESTAMP","WEEKDAY","WEEKOFYEAR","WINDOW","YEAR","FROM_JSON","GET_JSON_OBJECT","JSON_ARRAY_LENGTH","JSON_OBJECT_KEYS","JSON_TUPLE","SCHEMA_OF_JSON","TO_JSON","ABS","ACOS","ACOSH","AGGREGATE","ARRAY_SORT","ASCII","ASIN","ASINH","ASSERT_TRUE","ATAN","ATAN2","ATANH","BASE64","BIN","BIT_COUNT","BIT_GET","BIT_LENGTH","BROUND","BTRIM","CARDINALITY","CBRT","CEIL","CEILING","CHAR_LENGTH","CHARACTER_LENGTH","CHR","CONCAT","CONCAT_WS","CONV","COS","COSH","COT","CRC32","CURRENT_CATALOG","CURRENT_DATABASE","CURRENT_USER","DEGREES","ELT","EXP","EXPM1","FACTORIAL","FIND_IN_SET","FLOOR","FORALL","FORMAT_NUMBER","FORMAT_STRING","FROM_CSV","GETBIT","HASH","HEX","HYPOT","INITCAP","INLINE","INLINE_OUTER","INPUT_FILE_BLOCK_LENGTH","INPUT_FILE_BLOCK_START","INPUT_FILE_NAME","INSTR","ISNAN","ISNOTNULL","ISNULL","JAVA_METHOD","LCASE","LEFT","LENGTH","LEVENSHTEIN","LN","LOCATE","LOG","LOG10","LOG1P","LOG2","LOWER","LPAD","LTRIM","MAP_FILTER","MAP_ZIP_WITH","MD5","MOD","MONOTONICALLY_INCREASING_ID","NAMED_STRUCT","NANVL","NEGATIVE","NVL","NVL2","OCTET_LENGTH","OVERLAY","PARSE_URL","PI","PMOD","POSEXPLODE","POSEXPLODE_OUTER","POSITION","POSITIVE","POW","POWER","PRINTF","RADIANS","RAISE_ERROR","RAND","RANDN","RANDOM","REFLECT","REGEXP_EXTRACT","REGEXP_EXTRACT_ALL","REGEXP_LIKE","REGEXP_REPLACE","REPEAT","REPLACE","REVERSE","RIGHT","RINT","ROUND","RPAD","RTRIM","SCHEMA_OF_CSV","SENTENCES","SHA","SHA1","SHA2","SHIFTLEFT","SHIFTRIGHT","SHIFTRIGHTUNSIGNED","SIGN","SIGNUM","SIN","SINH","SOUNDEX","SPACE","SPARK_PARTITION_ID","SPLIT","SQRT","STACK","SUBSTR","SUBSTRING","SUBSTRING_INDEX","TAN","TANH","TO_CSV","TRANSFORM_KEYS","TRANSFORM_VALUES","TRANSLATE","TRIM","TRY_ADD","TRY_DIVIDE","TYPEOF","UCASE","UNBASE64","UNHEX","UPPER","UUID","VERSION","WIDTH_BUCKET","XPATH","XPATH_BOOLEAN","XPATH_DOUBLE","XPATH_FLOAT","XPATH_INT","XPATH_LONG","XPATH_NUMBER","XPATH_SHORT","XPATH_STRING","XXHASH64","ZIP_WITH","CAST","COALESCE","NULLIF"],so=v(["SELECT [ALL | DISTINCT]"]),So=v(["WITH","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","SORT BY","CLUSTER BY","DISTRIBUTE BY","LIMIT","INSERT [INTO | OVERWRITE] [TABLE]","VALUES","INSERT OVERWRITE [LOCAL] DIRECTORY","LOAD DATA [LOCAL] INPATH","[OVERWRITE] INTO TABLE"]),ar=v(["CREATE [EXTERNAL] TABLE [IF NOT EXISTS]"]),zt=v(["CREATE [OR REPLACE] [GLOBAL TEMPORARY | TEMPORARY] VIEW [IF NOT EXISTS]","DROP TABLE [IF EXISTS]","ALTER TABLE","ADD COLUMNS","DROP {COLUMN | COLUMNS}","RENAME TO","RENAME COLUMN","ALTER COLUMN","TRUNCATE TABLE","LATERAL VIEW","ALTER DATABASE","ALTER VIEW","CREATE DATABASE","CREATE FUNCTION","DROP DATABASE","DROP FUNCTION","DROP VIEW","REPAIR TABLE","USE DATABASE","TABLESAMPLE","PIVOT","TRANSFORM","EXPLAIN","ADD FILE","ADD JAR","ANALYZE TABLE","CACHE TABLE","CLEAR CACHE","DESCRIBE DATABASE","DESCRIBE FUNCTION","DESCRIBE QUERY","DESCRIBE TABLE","LIST FILE","LIST JAR","REFRESH","REFRESH TABLE","REFRESH FUNCTION","RESET","SHOW COLUMNS","SHOW CREATE TABLE","SHOW DATABASES","SHOW FUNCTIONS","SHOW PARTITIONS","SHOW TABLE EXTENDED","SHOW TABLES","SHOW TBLPROPERTIES","SHOW VIEWS","UNCACHE TABLE"]),oo=v(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),Oo=v(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN","[LEFT] {ANTI | SEMI} JOIN","NATURAL [LEFT] {ANTI | SEMI} JOIN"]),io=v(["ON DELETE","ON UPDATE","CURRENT ROW","{ROWS | RANGE} BETWEEN"]),ao={name:"spark",tokenizerOptions:{reservedSelect:so,reservedClauses:[...So,...ar,...zt],reservedSetOperations:oo,reservedJoins:Oo,reservedPhrases:io,supportsXor:!0,reservedKeywords:Ro,reservedDataTypes:no,reservedFunctionNames:Ao,extraParens:["[]"],stringTypes:["''-bs",'""-bs',{quote:"''-raw",prefixes:["R","X"],requirePrefix:!0},{quote:'""-raw',prefixes:["R","X"],requirePrefix:!0}],identTypes:["``"],variableTypes:[{quote:"{}",prefixes:["$"],requirePrefix:!0}],operators:["%","~","^","|","&","<=>","==","!","||","->"],postProcess:Io},formatOptions:{onelineClauses:[...ar,...zt],tabularOnelineClauses:zt}};function Io(E){return E.map((e,T)=>{const t=E[T-1]||et,r=E[T+1]||et;return vE.WINDOW(e)&&r.type==="OPEN_PAREN"?AE(eE({},e),{type:"RESERVED_FUNCTION_NAME"}):e.text==="ITEMS"&&e.type==="RESERVED_KEYWORD"&&!(t.text==="COLLECTION"&&r.text==="TERMINATED")?AE(eE({},e),{type:"IDENTIFIER",text:e.raw}):e})}var No=["ABS","CHANGES","CHAR","COALESCE","FORMAT","GLOB","HEX","IFNULL","IIF","INSTR","LAST_INSERT_ROWID","LENGTH","LIKE","LIKELIHOOD","LIKELY","LOAD_EXTENSION","LOWER","LTRIM","NULLIF","PRINTF","QUOTE","RANDOM","RANDOMBLOB","REPLACE","ROUND","RTRIM","SIGN","SOUNDEX","SQLITE_COMPILEOPTION_GET","SQLITE_COMPILEOPTION_USED","SQLITE_OFFSET","SQLITE_SOURCE_ID","SQLITE_VERSION","SUBSTR","SUBSTRING","TOTAL_CHANGES","TRIM","TYPEOF","UNICODE","UNLIKELY","UPPER","ZEROBLOB","AVG","COUNT","GROUP_CONCAT","MAX","MIN","SUM","TOTAL","DATE","TIME","DATETIME","JULIANDAY","UNIXEPOCH","STRFTIME","row_number","rank","dense_rank","percent_rank","cume_dist","ntile","lag","lead","first_value","last_value","nth_value","ACOS","ACOSH","ASIN","ASINH","ATAN","ATAN2","ATANH","CEIL","CEILING","COS","COSH","DEGREES","EXP","FLOOR","LN","LOG","LOG","LOG10","LOG2","MOD","PI","POW","POWER","RADIANS","SIN","SINH","SQRT","TAN","TANH","TRUNC","JSON","JSON_ARRAY","JSON_ARRAY_LENGTH","JSON_ARRAY_LENGTH","JSON_EXTRACT","JSON_INSERT","JSON_OBJECT","JSON_PATCH","JSON_REMOVE","JSON_REPLACE","JSON_SET","JSON_TYPE","JSON_TYPE","JSON_VALID","JSON_QUOTE","JSON_GROUP_ARRAY","JSON_GROUP_OBJECT","JSON_EACH","JSON_TREE","CAST"],lo=["ABORT","ACTION","ADD","AFTER","ALL","ALTER","AND","ARE","ALWAYS","ANALYZE","AS","ASC","ATTACH","AUTOINCREMENT","BEFORE","BEGIN","BETWEEN","BY","CASCADE","CASE","CAST","CHECK","COLLATE","COLUMN","COMMIT","CONFLICT","CONSTRAINT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATABASE","DEFAULT","DEFERRABLE","DEFERRED","DELETE","DESC","DETACH","DISTINCT","DO","DROP","EACH","ELSE","END","ESCAPE","EXCEPT","EXCLUDE","EXCLUSIVE","EXISTS","EXPLAIN","FAIL","FILTER","FIRST","FOLLOWING","FOR","FOREIGN","FROM","FULL","GENERATED","GLOB","GROUP","GROUPS","HAVING","IF","IGNORE","IMMEDIATE","IN","INDEX","INDEXED","INITIALLY","INNER","INSERT","INSTEAD","INTERSECT","INTO","IS","ISNULL","JOIN","KEY","LAST","LEFT","LIKE","LIMIT","MATCH","MATERIALIZED","NATURAL","NO","NOT","NOTHING","NOTNULL","NULL","NULLS","OF","OFFSET","ON","ONLY","OPEN","OR","ORDER","OTHERS","OUTER","OVER","PARTITION","PLAN","PRAGMA","PRECEDING","PRIMARY","QUERY","RAISE","RANGE","RECURSIVE","REFERENCES","REGEXP","REINDEX","RELEASE","RENAME","REPLACE","RESTRICT","RETURNING","RIGHT","ROLLBACK","ROW","ROWS","SAVEPOINT","SELECT","SET","TABLE","TEMP","TEMPORARY","THEN","TIES","TO","TRANSACTION","TRIGGER","UNBOUNDED","UNION","UNIQUE","UPDATE","USING","VACUUM","VALUES","VIEW","VIRTUAL","WHEN","WHERE","WINDOW","WITH","WITHOUT"],_o=["ANY","ARRAY","BLOB","CHARACTER","DECIMAL","INT","INTEGER","NATIVE CHARACTER","NCHAR","NUMERIC","NVARCHAR","REAL","TEXT","VARCHAR","VARYING CHARACTER"],Lo=v(["SELECT [ALL | DISTINCT]"]),Co=v(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT [OR ABORT | OR FAIL | OR IGNORE | OR REPLACE | OR ROLLBACK] INTO","REPLACE INTO","VALUES","SET"]),Ir=v(["CREATE [TEMPORARY | TEMP] TABLE [IF NOT EXISTS]"]),eT=v(["CREATE [TEMPORARY | TEMP] VIEW [IF NOT EXISTS]","UPDATE [OR ABORT | OR FAIL | OR IGNORE | OR REPLACE | OR ROLLBACK]","ON CONFLICT","DELETE FROM","DROP TABLE [IF EXISTS]","ALTER TABLE","ADD [COLUMN]","DROP [COLUMN]","RENAME [COLUMN]","RENAME TO","SET SCHEMA"]),uo=v(["UNION [ALL]","EXCEPT","INTERSECT"]),co=v(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),fo=v(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE | GROUPS} BETWEEN"]),Po={name:"sqlite",tokenizerOptions:{reservedSelect:Lo,reservedClauses:[...Co,...Ir,...eT],reservedSetOperations:uo,reservedJoins:co,reservedPhrases:fo,reservedKeywords:lo,reservedDataTypes:_o,reservedFunctionNames:No,stringTypes:["''-qq",{quote:"''-raw",prefixes:["X"],requirePrefix:!0}],identTypes:['""-qq',"``","[]"],paramTypes:{positional:!0,numbered:["?"],named:[":","@","$"]},operators:["%","~","&","|","<<",">>","==","->","->>","||"]},formatOptions:{onelineClauses:[...Ir,...eT],tabularOnelineClauses:eT}},Do=["GROUPING","RANK","DENSE_RANK","PERCENT_RANK","CUME_DIST","ROW_NUMBER","POSITION","OCCURRENCES_REGEX","POSITION_REGEX","EXTRACT","CHAR_LENGTH","CHARACTER_LENGTH","OCTET_LENGTH","CARDINALITY","ABS","MOD","LN","EXP","POWER","SQRT","FLOOR","CEIL","CEILING","WIDTH_BUCKET","SUBSTRING","SUBSTRING_REGEX","UPPER","LOWER","CONVERT","TRANSLATE","TRANSLATE_REGEX","TRIM","OVERLAY","NORMALIZE","SPECIFICTYPE","CURRENT_DATE","CURRENT_TIME","LOCALTIME","CURRENT_TIMESTAMP","LOCALTIMESTAMP","COUNT","AVG","MAX","MIN","SUM","STDDEV_POP","STDDEV_SAMP","VAR_SAMP","VAR_POP","COLLECT","FUSION","INTERSECTION","COVAR_POP","COVAR_SAMP","CORR","REGR_SLOPE","REGR_INTERCEPT","REGR_COUNT","REGR_R2","REGR_AVGX","REGR_AVGY","REGR_SXX","REGR_SYY","REGR_SXY","PERCENTILE_CONT","PERCENTILE_DISC","CAST","COALESCE","NULLIF","ROUND","SIN","COS","TAN","ASIN","ACOS","ATAN"],po=["ALL","ALLOCATE","ALTER","ANY","ARE","AS","ASC","ASENSITIVE","ASYMMETRIC","AT","ATOMIC","AUTHORIZATION","BEGIN","BETWEEN","BOTH","BY","CALL","CALLED","CASCADED","CAST","CHECK","CLOSE","COALESCE","COLLATE","COLUMN","COMMIT","CONDITION","CONNECT","CONSTRAINT","CORRESPONDING","CREATE","CROSS","CUBE","CURRENT","CURRENT_CATALOG","CURRENT_DEFAULT_TRANSFORM_GROUP","CURRENT_PATH","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_TRANSFORM_GROUP_FOR_TYPE","CURRENT_USER","CURSOR","CYCLE","DEALLOCATE","DAY","DECLARE","DEFAULT","DELETE","DEREF","DESC","DESCRIBE","DETERMINISTIC","DISCONNECT","DISTINCT","DROP","DYNAMIC","EACH","ELEMENT","END-EXEC","ESCAPE","EVERY","EXCEPT","EXEC","EXECUTE","EXISTS","EXTERNAL","FALSE","FETCH","FILTER","FOR","FOREIGN","FREE","FROM","FULL","FUNCTION","GET","GLOBAL","GRANT","GROUP","HAVING","HOLD","HOUR","IDENTITY","IN","INDICATOR","INNER","INOUT","INSENSITIVE","INSERT","INTERSECT","INTO","IS","LANGUAGE","LARGE","LATERAL","LEADING","LEFT","LIKE","LIKE_REGEX","LOCAL","MATCH","MEMBER","MERGE","METHOD","MINUTE","MODIFIES","MODULE","MONTH","NATURAL","NEW","NO","NONE","NOT","NULL","NULLIF","OF","OLD","ON","ONLY","OPEN","ORDER","OUT","OUTER","OVER","OVERLAPS","PARAMETER","PARTITION","PRECISION","PREPARE","PRIMARY","PROCEDURE","RANGE","READS","REAL","RECURSIVE","REF","REFERENCES","REFERENCING","RELEASE","RESULT","RETURN","RETURNS","REVOKE","RIGHT","ROLLBACK","ROLLUP","ROW","ROWS","SAVEPOINT","SCOPE","SCROLL","SEARCH","SECOND","SELECT","SENSITIVE","SESSION_USER","SET","SIMILAR","SOME","SPECIFIC","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","START","STATIC","SUBMULTISET","SYMMETRIC","SYSTEM","SYSTEM_USER","TABLE","TABLESAMPLE","THEN","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRANSLATION","TREAT","TRIGGER","TRUE","UESCAPE","UNION","UNIQUE","UNKNOWN","UNNEST","UPDATE","USER","USING","VALUE","VALUES","WHENEVER","WINDOW","WITHIN","WITHOUT","YEAR"],Mo=["ARRAY","BIGINT","BINARY LARGE OBJECT","BINARY VARYING","BINARY","BLOB","BOOLEAN","CHAR LARGE OBJECT","CHAR VARYING","CHAR","CHARACTER LARGE OBJECT","CHARACTER VARYING","CHARACTER","CLOB","DATE","DEC","DECIMAL","DOUBLE","FLOAT","INT","INTEGER","INTERVAL","MULTISET","NATIONAL CHAR VARYING","NATIONAL CHAR","NATIONAL CHARACTER LARGE OBJECT","NATIONAL CHARACTER VARYING","NATIONAL CHARACTER","NCHAR LARGE OBJECT","NCHAR VARYING","NCHAR","NCLOB","NUMERIC","SMALLINT","TIME","TIMESTAMP","VARBINARY","VARCHAR"],Uo=v(["SELECT [ALL | DISTINCT]"]),mo=v(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY [ALL | DISTINCT]","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","FETCH {FIRST | NEXT}","INSERT INTO","VALUES","SET"]),Nr=v(["CREATE [GLOBAL TEMPORARY | LOCAL TEMPORARY] TABLE"]),ET=v(["CREATE [RECURSIVE] VIEW","UPDATE","WHERE CURRENT OF","DELETE FROM","DROP TABLE","ALTER TABLE","ADD COLUMN","DROP [COLUMN]","RENAME COLUMN","RENAME TO","ALTER [COLUMN]","{SET | DROP} DEFAULT","ADD SCOPE","DROP SCOPE {CASCADE | RESTRICT}","RESTART WITH","TRUNCATE TABLE","SET SCHEMA"]),ho=v(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),Go=v(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),go=v(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE} BETWEEN"]),Ho={name:"sql",tokenizerOptions:{reservedSelect:Uo,reservedClauses:[...mo,...Nr,...ET],reservedSetOperations:ho,reservedJoins:Go,reservedPhrases:go,reservedKeywords:po,reservedDataTypes:Mo,reservedFunctionNames:Do,stringTypes:[{quote:"''-qq-bs",prefixes:["N","U&"]},{quote:"''-raw",prefixes:["X"],requirePrefix:!0}],identTypes:['""-qq',"``"],paramTypes:{positional:!0},operators:["||"]},formatOptions:{onelineClauses:[...Nr,...ET],tabularOnelineClauses:ET}},bo=["ABS","ACOS","ALL_MATCH","ANY_MATCH","APPROX_DISTINCT","APPROX_MOST_FREQUENT","APPROX_PERCENTILE","APPROX_SET","ARBITRARY","ARRAYS_OVERLAP","ARRAY_AGG","ARRAY_DISTINCT","ARRAY_EXCEPT","ARRAY_INTERSECT","ARRAY_JOIN","ARRAY_MAX","ARRAY_MIN","ARRAY_POSITION","ARRAY_REMOVE","ARRAY_SORT","ARRAY_UNION","ASIN","ATAN","ATAN2","AT_TIMEZONE","AVG","BAR","BETA_CDF","BING_TILE","BING_TILES_AROUND","BING_TILE_AT","BING_TILE_COORDINATES","BING_TILE_POLYGON","BING_TILE_QUADKEY","BING_TILE_ZOOM_LEVEL","BITWISE_AND","BITWISE_AND_AGG","BITWISE_LEFT_SHIFT","BITWISE_NOT","BITWISE_OR","BITWISE_OR_AGG","BITWISE_RIGHT_SHIFT","BITWISE_RIGHT_SHIFT_ARITHMETIC","BITWISE_XOR","BIT_COUNT","BOOL_AND","BOOL_OR","CARDINALITY","CAST","CBRT","CEIL","CEILING","CHAR2HEXINT","CHECKSUM","CHR","CLASSIFY","COALESCE","CODEPOINT","COLOR","COMBINATIONS","CONCAT","CONCAT_WS","CONTAINS","CONTAINS_SEQUENCE","CONVEX_HULL_AGG","CORR","COS","COSH","COSINE_SIMILARITY","COUNT","COUNT_IF","COVAR_POP","COVAR_SAMP","CRC32","CUME_DIST","CURRENT_CATALOG","CURRENT_DATE","CURRENT_GROUPS","CURRENT_SCHEMA","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","CURRENT_USER","DATE","DATE_ADD","DATE_DIFF","DATE_FORMAT","DATE_PARSE","DATE_TRUNC","DAY","DAY_OF_MONTH","DAY_OF_WEEK","DAY_OF_YEAR","DEGREES","DENSE_RANK","DOW","DOY","E","ELEMENT_AT","EMPTY_APPROX_SET","EVALUATE_CLASSIFIER_PREDICTIONS","EVERY","EXP","EXTRACT","FEATURES","FILTER","FIRST_VALUE","FLATTEN","FLOOR","FORMAT","FORMAT_DATETIME","FORMAT_NUMBER","FROM_BASE","FROM_BASE32","FROM_BASE64","FROM_BASE64URL","FROM_BIG_ENDIAN_32","FROM_BIG_ENDIAN_64","FROM_ENCODED_POLYLINE","FROM_GEOJSON_GEOMETRY","FROM_HEX","FROM_IEEE754_32","FROM_IEEE754_64","FROM_ISO8601_DATE","FROM_ISO8601_TIMESTAMP","FROM_ISO8601_TIMESTAMP_NANOS","FROM_UNIXTIME","FROM_UNIXTIME_NANOS","FROM_UTF8","GEOMETRIC_MEAN","GEOMETRY_FROM_HADOOP_SHAPE","GEOMETRY_INVALID_REASON","GEOMETRY_NEAREST_POINTS","GEOMETRY_TO_BING_TILES","GEOMETRY_UNION","GEOMETRY_UNION_AGG","GREATEST","GREAT_CIRCLE_DISTANCE","HAMMING_DISTANCE","HASH_COUNTS","HISTOGRAM","HMAC_MD5","HMAC_SHA1","HMAC_SHA256","HMAC_SHA512","HOUR","HUMAN_READABLE_SECONDS","IF","INDEX","INFINITY","INTERSECTION_CARDINALITY","INVERSE_BETA_CDF","INVERSE_NORMAL_CDF","IS_FINITE","IS_INFINITE","IS_JSON_SCALAR","IS_NAN","JACCARD_INDEX","JSON_ARRAY_CONTAINS","JSON_ARRAY_GET","JSON_ARRAY_LENGTH","JSON_EXISTS","JSON_EXTRACT","JSON_EXTRACT_SCALAR","JSON_FORMAT","JSON_PARSE","JSON_QUERY","JSON_SIZE","JSON_VALUE","KURTOSIS","LAG","LAST_DAY_OF_MONTH","LAST_VALUE","LEAD","LEARN_CLASSIFIER","LEARN_LIBSVM_CLASSIFIER","LEARN_LIBSVM_REGRESSOR","LEARN_REGRESSOR","LEAST","LENGTH","LEVENSHTEIN_DISTANCE","LINE_INTERPOLATE_POINT","LINE_INTERPOLATE_POINTS","LINE_LOCATE_POINT","LISTAGG","LN","LOCALTIME","LOCALTIMESTAMP","LOG","LOG10","LOG2","LOWER","LPAD","LTRIM","LUHN_CHECK","MAKE_SET_DIGEST","MAP","MAP_AGG","MAP_CONCAT","MAP_ENTRIES","MAP_FILTER","MAP_FROM_ENTRIES","MAP_KEYS","MAP_UNION","MAP_VALUES","MAP_ZIP_WITH","MAX","MAX_BY","MD5","MERGE","MERGE_SET_DIGEST","MILLISECOND","MIN","MINUTE","MIN_BY","MOD","MONTH","MULTIMAP_AGG","MULTIMAP_FROM_ENTRIES","MURMUR3","NAN","NGRAMS","NONE_MATCH","NORMALIZE","NORMAL_CDF","NOW","NTH_VALUE","NTILE","NULLIF","NUMERIC_HISTOGRAM","OBJECTID","OBJECTID_TIMESTAMP","PARSE_DATA_SIZE","PARSE_DATETIME","PARSE_DURATION","PERCENT_RANK","PI","POSITION","POW","POWER","QDIGEST_AGG","QUARTER","RADIANS","RAND","RANDOM","RANK","REDUCE","REDUCE_AGG","REGEXP_COUNT","REGEXP_EXTRACT","REGEXP_EXTRACT_ALL","REGEXP_LIKE","REGEXP_POSITION","REGEXP_REPLACE","REGEXP_SPLIT","REGRESS","REGR_INTERCEPT","REGR_SLOPE","RENDER","REPEAT","REPLACE","REVERSE","RGB","ROUND","ROW_NUMBER","RPAD","RTRIM","SECOND","SEQUENCE","SHA1","SHA256","SHA512","SHUFFLE","SIGN","SIMPLIFY_GEOMETRY","SIN","SKEWNESS","SLICE","SOUNDEX","SPATIAL_PARTITIONING","SPATIAL_PARTITIONS","SPLIT","SPLIT_PART","SPLIT_TO_MAP","SPLIT_TO_MULTIMAP","SPOOKY_HASH_V2_32","SPOOKY_HASH_V2_64","SQRT","STARTS_WITH","STDDEV","STDDEV_POP","STDDEV_SAMP","STRPOS","ST_AREA","ST_ASBINARY","ST_ASTEXT","ST_BOUNDARY","ST_BUFFER","ST_CENTROID","ST_CONTAINS","ST_CONVEXHULL","ST_COORDDIM","ST_CROSSES","ST_DIFFERENCE","ST_DIMENSION","ST_DISJOINT","ST_DISTANCE","ST_ENDPOINT","ST_ENVELOPE","ST_ENVELOPEASPTS","ST_EQUALS","ST_EXTERIORRING","ST_GEOMETRIES","ST_GEOMETRYFROMTEXT","ST_GEOMETRYN","ST_GEOMETRYTYPE","ST_GEOMFROMBINARY","ST_INTERIORRINGN","ST_INTERIORRINGS","ST_INTERSECTION","ST_INTERSECTS","ST_ISCLOSED","ST_ISEMPTY","ST_ISRING","ST_ISSIMPLE","ST_ISVALID","ST_LENGTH","ST_LINEFROMTEXT","ST_LINESTRING","ST_MULTIPOINT","ST_NUMGEOMETRIES","ST_NUMINTERIORRING","ST_NUMPOINTS","ST_OVERLAPS","ST_POINT","ST_POINTN","ST_POINTS","ST_POLYGON","ST_RELATE","ST_STARTPOINT","ST_SYMDIFFERENCE","ST_TOUCHES","ST_UNION","ST_WITHIN","ST_X","ST_XMAX","ST_XMIN","ST_Y","ST_YMAX","ST_YMIN","SUBSTR","SUBSTRING","SUM","TAN","TANH","TDIGEST_AGG","TIMESTAMP_OBJECTID","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO_BASE","TO_BASE32","TO_BASE64","TO_BASE64URL","TO_BIG_ENDIAN_32","TO_BIG_ENDIAN_64","TO_CHAR","TO_DATE","TO_ENCODED_POLYLINE","TO_GEOJSON_GEOMETRY","TO_GEOMETRY","TO_HEX","TO_IEEE754_32","TO_IEEE754_64","TO_ISO8601","TO_MILLISECONDS","TO_SPHERICAL_GEOGRAPHY","TO_TIMESTAMP","TO_UNIXTIME","TO_UTF8","TRANSFORM","TRANSFORM_KEYS","TRANSFORM_VALUES","TRANSLATE","TRIM","TRIM_ARRAY","TRUNCATE","TRY","TRY_CAST","TYPEOF","UPPER","URL_DECODE","URL_ENCODE","URL_EXTRACT_FRAGMENT","URL_EXTRACT_HOST","URL_EXTRACT_PARAMETER","URL_EXTRACT_PATH","URL_EXTRACT_PORT","URL_EXTRACT_PROTOCOL","URL_EXTRACT_QUERY","UUID","VALUES_AT_QUANTILES","VALUE_AT_QUANTILE","VARIANCE","VAR_POP","VAR_SAMP","VERSION","WEEK","WEEK_OF_YEAR","WIDTH_BUCKET","WILSON_INTERVAL_LOWER","WILSON_INTERVAL_UPPER","WITH_TIMEZONE","WORD_STEM","XXHASH64","YEAR","YEAR_OF_WEEK","YOW","ZIP","ZIP_WITH","CLASSIFIER","FIRST","LAST","MATCH_NUMBER","NEXT","PERMUTE","PREV"],yo=["ABSENT","ADD","ADMIN","AFTER","ALL","ALTER","ANALYZE","AND","ANY","AS","ASC","AT","AUTHORIZATION","BERNOULLI","BETWEEN","BOTH","BY","CALL","CASCADE","CASE","CATALOGS","COLUMN","COLUMNS","COMMENT","COMMIT","COMMITTED","CONDITIONAL","CONSTRAINT","COPARTITION","CREATE","CROSS","CUBE","CURRENT","CURRENT_PATH","CURRENT_ROLE","DATA","DEALLOCATE","DEFAULT","DEFINE","DEFINER","DELETE","DENY","DESC","DESCRIBE","DESCRIPTOR","DISTINCT","DISTRIBUTED","DOUBLE","DROP","ELSE","EMPTY","ENCODING","END","ERROR","ESCAPE","EXCEPT","EXCLUDING","EXECUTE","EXISTS","EXPLAIN","FALSE","FETCH","FINAL","FIRST","FOLLOWING","FOR","FROM","FULL","FUNCTIONS","GRANT","GRANTED","GRANTS","GRAPHVIZ","GROUP","GROUPING","GROUPS","HAVING","IGNORE","IN","INCLUDING","INITIAL","INNER","INPUT","INSERT","INTERSECT","INTERVAL","INTO","INVOKER","IO","IS","ISOLATION","JOIN","JSON","JSON_ARRAY","JSON_OBJECT","KEEP","KEY","KEYS","LAST","LATERAL","LEADING","LEFT","LEVEL","LIKE","LIMIT","LOCAL","LOGICAL","MATCH","MATCHED","MATCHES","MATCH_RECOGNIZE","MATERIALIZED","MEASURES","NATURAL","NEXT","NFC","NFD","NFKC","NFKD","NO","NONE","NOT","NULL","NULLS","OBJECT","OF","OFFSET","OMIT","ON","ONE","ONLY","OPTION","OR","ORDER","ORDINALITY","OUTER","OUTPUT","OVER","OVERFLOW","PARTITION","PARTITIONS","PASSING","PAST","PATH","PATTERN","PER","PERMUTE","PRECEDING","PRECISION","PREPARE","PRIVILEGES","PROPERTIES","PRUNE","QUOTES","RANGE","READ","RECURSIVE","REFRESH","RENAME","REPEATABLE","RESET","RESPECT","RESTRICT","RETURNING","REVOKE","RIGHT","ROLE","ROLES","ROLLBACK","ROLLUP","ROW","ROWS","RUNNING","SCALAR","SCHEMA","SCHEMAS","SECURITY","SEEK","SELECT","SERIALIZABLE","SESSION","SET","SETS","SHOW","SKIP","SOME","START","STATS","STRING","SUBSET","SYSTEM","TABLE","TABLES","TABLESAMPLE","TEXT","THEN","TIES","TIME","TIMESTAMP","TO","TRAILING","TRANSACTION","TRUE","TYPE","UESCAPE","UNBOUNDED","UNCOMMITTED","UNCONDITIONAL","UNION","UNIQUE","UNKNOWN","UNMATCHED","UNNEST","UPDATE","USE","USER","USING","UTF16","UTF32","UTF8","VALIDATE","VALUE","VALUES","VERBOSE","VIEW","WHEN","WHERE","WINDOW","WITH","WITHIN","WITHOUT","WORK","WRAPPER","WRITE","ZONE"],Bo=["BIGINT","INT","INTEGER","SMALLINT","TINYINT","BOOLEAN","DATE","DECIMAL","REAL","DOUBLE","HYPERLOGLOG","QDIGEST","TDIGEST","P4HYPERLOGLOG","INTERVAL","TIMESTAMP","TIME","VARBINARY","VARCHAR","CHAR","ROW","ARRAY","MAP","JSON","JSON2016","IPADDRESS","GEOMETRY","UUID","SETDIGEST","JONIREGEXP","RE2JREGEXP","LIKEPATTERN","COLOR","CODEPOINTS","FUNCTION","JSONPATH"],vo=v(["SELECT [ALL | DISTINCT]"]),Fo=v(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY [ALL | DISTINCT]","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","FETCH {FIRST | NEXT}","INSERT INTO","VALUES","SET","MATCH_RECOGNIZE","MEASURES","ONE ROW PER MATCH","ALL ROWS PER MATCH","AFTER MATCH","PATTERN","SUBSET","DEFINE"]),lr=v(["CREATE TABLE [IF NOT EXISTS]"]),tT=v(["CREATE [OR REPLACE] [MATERIALIZED] VIEW","UPDATE","DELETE FROM","DROP TABLE [IF EXISTS]","ALTER TABLE [IF EXISTS]","ADD COLUMN [IF NOT EXISTS]","DROP COLUMN [IF EXISTS]","RENAME COLUMN [IF EXISTS]","RENAME TO","SET AUTHORIZATION [USER | ROLE]","SET PROPERTIES","EXECUTE","TRUNCATE TABLE","ALTER SCHEMA","ALTER MATERIALIZED VIEW","ALTER VIEW","CREATE SCHEMA","CREATE ROLE","DROP SCHEMA","DROP MATERIALIZED VIEW","DROP VIEW","DROP ROLE","EXPLAIN","ANALYZE","EXPLAIN ANALYZE","EXPLAIN ANALYZE VERBOSE","USE","DESCRIBE INPUT","DESCRIBE OUTPUT","REFRESH MATERIALIZED VIEW","RESET SESSION","SET SESSION","SET PATH","SET TIME ZONE","SHOW GRANTS","SHOW CREATE TABLE","SHOW CREATE SCHEMA","SHOW CREATE VIEW","SHOW CREATE MATERIALIZED VIEW","SHOW TABLES","SHOW SCHEMAS","SHOW CATALOGS","SHOW COLUMNS","SHOW STATS FOR","SHOW ROLES","SHOW CURRENT ROLES","SHOW ROLE GRANTS","SHOW FUNCTIONS","SHOW SESSION"]),Yo=v(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),Vo=v(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),Wo=v(["{ROWS | RANGE | GROUPS} BETWEEN","IS [NOT] DISTINCT FROM"]),wo={name:"trino",tokenizerOptions:{reservedSelect:vo,reservedClauses:[...Fo,...lr,...tT],reservedSetOperations:Yo,reservedJoins:Vo,reservedPhrases:Wo,reservedKeywords:yo,reservedDataTypes:Bo,reservedFunctionNames:bo,extraParens:["[]","{}"],stringTypes:[{quote:"''-qq",prefixes:["U&"]},{quote:"''-raw",prefixes:["X"],requirePrefix:!0}],identTypes:['""-qq'],paramTypes:{positional:!0},operators:["%","->","=>",":","||","|","^","$"]},formatOptions:{onelineClauses:[...lr,...tT],tabularOnelineClauses:tT}},xo=["APPROX_COUNT_DISTINCT","AVG","CHECKSUM_AGG","COUNT","COUNT_BIG","GROUPING","GROUPING_ID","MAX","MIN","STDEV","STDEVP","SUM","VAR","VARP","CUME_DIST","FIRST_VALUE","LAG","LAST_VALUE","LEAD","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","Collation - COLLATIONPROPERTY","Collation - TERTIARY_WEIGHTS","@@DBTS","@@LANGID","@@LANGUAGE","@@LOCK_TIMEOUT","@@MAX_CONNECTIONS","@@MAX_PRECISION","@@NESTLEVEL","@@OPTIONS","@@REMSERVER","@@SERVERNAME","@@SERVICENAME","@@SPID","@@TEXTSIZE","@@VERSION","CAST","CONVERT","PARSE","TRY_CAST","TRY_CONVERT","TRY_PARSE","ASYMKEY_ID","ASYMKEYPROPERTY","CERTPROPERTY","CERT_ID","CRYPT_GEN_RANDOM","DECRYPTBYASYMKEY","DECRYPTBYCERT","DECRYPTBYKEY","DECRYPTBYKEYAUTOASYMKEY","DECRYPTBYKEYAUTOCERT","DECRYPTBYPASSPHRASE","ENCRYPTBYASYMKEY","ENCRYPTBYCERT","ENCRYPTBYKEY","ENCRYPTBYPASSPHRASE","HASHBYTES","IS_OBJECTSIGNED","KEY_GUID","KEY_ID","KEY_NAME","SIGNBYASYMKEY","SIGNBYCERT","SYMKEYPROPERTY","VERIFYSIGNEDBYCERT","VERIFYSIGNEDBYASYMKEY","@@CURSOR_ROWS","@@FETCH_STATUS","CURSOR_STATUS","DATALENGTH","IDENT_CURRENT","IDENT_INCR","IDENT_SEED","IDENTITY","SQL_VARIANT_PROPERTY","@@DATEFIRST","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","CURRENT_TIMEZONE_ID","DATEADD","DATEDIFF","DATEDIFF_BIG","DATEFROMPARTS","DATENAME","DATEPART","DATETIME2FROMPARTS","DATETIMEFROMPARTS","DATETIMEOFFSETFROMPARTS","DAY","EOMONTH","GETDATE","GETUTCDATE","ISDATE","MONTH","SMALLDATETIMEFROMPARTS","SWITCHOFFSET","SYSDATETIME","SYSDATETIMEOFFSET","SYSUTCDATETIME","TIMEFROMPARTS","TODATETIMEOFFSET","YEAR","JSON","ISJSON","JSON_VALUE","JSON_QUERY","JSON_MODIFY","ABS","ACOS","ASIN","ATAN","ATN2","CEILING","COS","COT","DEGREES","EXP","FLOOR","LOG","LOG10","PI","POWER","RADIANS","RAND","ROUND","SIGN","SIN","SQRT","SQUARE","TAN","CHOOSE","GREATEST","IIF","LEAST","@@PROCID","APP_NAME","APPLOCK_MODE","APPLOCK_TEST","ASSEMBLYPROPERTY","COL_LENGTH","COL_NAME","COLUMNPROPERTY","DATABASEPROPERTYEX","DB_ID","DB_NAME","FILE_ID","FILE_IDEX","FILE_NAME","FILEGROUP_ID","FILEGROUP_NAME","FILEGROUPPROPERTY","FILEPROPERTY","FILEPROPERTYEX","FULLTEXTCATALOGPROPERTY","FULLTEXTSERVICEPROPERTY","INDEX_COL","INDEXKEY_PROPERTY","INDEXPROPERTY","NEXT VALUE FOR","OBJECT_DEFINITION","OBJECT_ID","OBJECT_NAME","OBJECT_SCHEMA_NAME","OBJECTPROPERTY","OBJECTPROPERTYEX","ORIGINAL_DB_NAME","PARSENAME","SCHEMA_ID","SCHEMA_NAME","SCOPE_IDENTITY","SERVERPROPERTY","STATS_DATE","TYPE_ID","TYPE_NAME","TYPEPROPERTY","DENSE_RANK","NTILE","RANK","ROW_NUMBER","PUBLISHINGSERVERNAME","CERTENCODED","CERTPRIVATEKEY","CURRENT_USER","DATABASE_PRINCIPAL_ID","HAS_DBACCESS","HAS_PERMS_BY_NAME","IS_MEMBER","IS_ROLEMEMBER","IS_SRVROLEMEMBER","LOGINPROPERTY","ORIGINAL_LOGIN","PERMISSIONS","PWDENCRYPT","PWDCOMPARE","SESSION_USER","SESSIONPROPERTY","SUSER_ID","SUSER_NAME","SUSER_SID","SUSER_SNAME","SYSTEM_USER","USER","USER_ID","USER_NAME","ASCII","CHAR","CHARINDEX","CONCAT","CONCAT_WS","DIFFERENCE","FORMAT","LEFT","LEN","LOWER","LTRIM","NCHAR","PATINDEX","QUOTENAME","REPLACE","REPLICATE","REVERSE","RIGHT","RTRIM","SOUNDEX","SPACE","STR","STRING_AGG","STRING_ESCAPE","STUFF","SUBSTRING","TRANSLATE","TRIM","UNICODE","UPPER","$PARTITION","@@ERROR","@@IDENTITY","@@PACK_RECEIVED","@@ROWCOUNT","@@TRANCOUNT","BINARY_CHECKSUM","CHECKSUM","COMPRESS","CONNECTIONPROPERTY","CONTEXT_INFO","CURRENT_REQUEST_ID","CURRENT_TRANSACTION_ID","DECOMPRESS","ERROR_LINE","ERROR_MESSAGE","ERROR_NUMBER","ERROR_PROCEDURE","ERROR_SEVERITY","ERROR_STATE","FORMATMESSAGE","GET_FILESTREAM_TRANSACTION_CONTEXT","GETANSINULL","HOST_ID","HOST_NAME","ISNULL","ISNUMERIC","MIN_ACTIVE_ROWVERSION","NEWID","NEWSEQUENTIALID","ROWCOUNT_BIG","SESSION_CONTEXT","XACT_STATE","@@CONNECTIONS","@@CPU_BUSY","@@IDLE","@@IO_BUSY","@@PACK_SENT","@@PACKET_ERRORS","@@TIMETICKS","@@TOTAL_ERRORS","@@TOTAL_READ","@@TOTAL_WRITE","TEXTPTR","TEXTVALID","COLUMNS_UPDATED","EVENTDATA","TRIGGER_NESTLEVEL","UPDATE","COALESCE","NULLIF"],$o=["ADD","ALL","ALTER","AND","ANY","AS","ASC","AUTHORIZATION","BACKUP","BEGIN","BETWEEN","BREAK","BROWSE","BULK","BY","CASCADE","CHECK","CHECKPOINT","CLOSE","CLUSTERED","COALESCE","COLLATE","COLUMN","COMMIT","COMPUTE","CONSTRAINT","CONTAINS","CONTAINSTABLE","CONTINUE","CONVERT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DBCC","DEALLOCATE","DECLARE","DEFAULT","DELETE","DENY","DESC","DISK","DISTINCT","DISTRIBUTED","DROP","DUMP","ERRLVL","ESCAPE","EXEC","EXECUTE","EXISTS","EXIT","EXTERNAL","FETCH","FILE","FILLFACTOR","FOR","FOREIGN","FREETEXT","FREETEXTTABLE","FROM","FULL","FUNCTION","GOTO","GRANT","GROUP","HAVING","HOLDLOCK","IDENTITY","IDENTITYCOL","IDENTITY_INSERT","IF","IN","INDEX","INNER","INSERT","INTERSECT","INTO","IS","JOIN","KEY","KILL","LEFT","LIKE","LINENO","LOAD","MERGE","NOCHECK","NONCLUSTERED","NOT","NULL","NULLIF","OF","OFF","OFFSETS","ON","OPEN","OPENDATASOURCE","OPENQUERY","OPENROWSET","OPENXML","OPTION","OR","ORDER","OUTER","OVER","PERCENT","PIVOT","PLAN","PRIMARY","PRINT","PROC","PROCEDURE","PUBLIC","RAISERROR","READ","READTEXT","RECONFIGURE","REFERENCES","REPLICATION","RESTORE","RESTRICT","RETURN","REVERT","REVOKE","RIGHT","ROLLBACK","ROWCOUNT","ROWGUIDCOL","RULE","SAVE","SCHEMA","SECURITYAUDIT","SELECT","SEMANTICKEYPHRASETABLE","SEMANTICSIMILARITYDETAILSTABLE","SEMANTICSIMILARITYTABLE","SESSION_USER","SET","SETUSER","SHUTDOWN","SOME","STATISTICS","SYSTEM_USER","TABLE","TABLESAMPLE","TEXTSIZE","THEN","TO","TOP","TRAN","TRANSACTION","TRIGGER","TRUNCATE","TRY_CONVERT","TSEQUAL","UNION","UNIQUE","UNPIVOT","UPDATE","UPDATETEXT","USE","USER","VALUES","VIEW","WAITFOR","WHERE","WHILE","WITH","WITHIN GROUP","WRITETEXT","ABSOLUTE","ACTION","ADA","ALLOCATE","ARE","ASSERTION","AT","AVG","BIT_LENGTH","BOTH","CASCADED","CAST","CATALOG","CHARACTER_LENGTH","CHAR_LENGTH","COLLATION","CONNECT","CONNECTION","CONSTRAINTS","CORRESPONDING","COUNT","DAY","DEFERRABLE","DEFERRED","DESCRIBE","DESCRIPTOR","DIAGNOSTICS","DISCONNECT","DOMAIN","END-EXEC","EXCEPTION","EXTRACT","FALSE","FIRST","FORTRAN","FOUND","GET","GLOBAL","GO","HOUR","IMMEDIATE","INCLUDE","INDICATOR","INITIALLY","INPUT","INSENSITIVE","INTERVAL","ISOLATION","LANGUAGE","LAST","LEADING","LEVEL","LOCAL","LOWER","MATCH","MAX","MIN","MINUTE","MODULE","MONTH","NAMES","NATURAL","NEXT","NO","NONE","OCTET_LENGTH","ONLY","OUTPUT","OVERLAPS","PAD","PARTIAL","PASCAL","POSITION","PREPARE","PRESERVE","PRIOR","PRIVILEGES","RELATIVE","ROWS","SCROLL","SECOND","SECTION","SESSION","SIZE","SPACE","SQL","SQLCA","SQLCODE","SQLERROR","SQLSTATE","SQLWARNING","SUBSTRING","SUM","TEMPORARY","TIMEZONE_HOUR","TIMEZONE_MINUTE","TRAILING","TRANSLATE","TRANSLATION","TRIM","TRUE","UNKNOWN","UPPER","USAGE","VALUE","WHENEVER","WORK","WRITE","YEAR","ZONE"],Xo=["BINARY","BIT","CHAR","CHAR","CHARACTER","DATE","DATETIME2","DATETIMEOFFSET","DEC","DECIMAL","DOUBLE","FLOAT","INT","INTEGER","NATIONAL","NCHAR","NUMERIC","NVARCHAR","PRECISION","REAL","SMALLINT","TIME","TIMESTAMP","VARBINARY","VARCHAR"],ko=v(["SELECT [ALL | DISTINCT]"]),Ko=v(["WITH","INTO","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","OFFSET","FETCH {FIRST | NEXT}","FOR {BROWSE | XML | JSON}","OPTION","INSERT [INTO]","VALUES","SET","MERGE [INTO]","WHEN [NOT] MATCHED [BY TARGET | BY SOURCE] [THEN]","UPDATE SET","CREATE [OR ALTER] {PROC | PROCEDURE}"]),_r=v(["CREATE TABLE"]),TT=v(["CREATE [OR ALTER] [MATERIALIZED] VIEW","UPDATE","WHERE CURRENT OF","DELETE [FROM]","DROP TABLE [IF EXISTS]","ALTER TABLE","ADD","DROP COLUMN [IF EXISTS]","ALTER COLUMN","TRUNCATE TABLE","ADD SENSITIVITY CLASSIFICATION","ADD SIGNATURE","AGGREGATE","ANSI_DEFAULTS","ANSI_NULLS","ANSI_NULL_DFLT_OFF","ANSI_NULL_DFLT_ON","ANSI_PADDING","ANSI_WARNINGS","APPLICATION ROLE","ARITHABORT","ARITHIGNORE","ASSEMBLY","ASYMMETRIC KEY","AUTHORIZATION","AVAILABILITY GROUP","BACKUP","BACKUP CERTIFICATE","BACKUP MASTER KEY","BACKUP SERVICE MASTER KEY","BEGIN CONVERSATION TIMER","BEGIN DIALOG CONVERSATION","BROKER PRIORITY","BULK INSERT","CERTIFICATE","CLOSE MASTER KEY","CLOSE SYMMETRIC KEY","COLLATE","COLUMN ENCRYPTION KEY","COLUMN MASTER KEY","COLUMNSTORE INDEX","CONCAT_NULL_YIELDS_NULL","CONTEXT_INFO","CONTRACT","CREDENTIAL","CRYPTOGRAPHIC PROVIDER","CURSOR_CLOSE_ON_COMMIT","DATABASE","DATABASE AUDIT SPECIFICATION","DATABASE ENCRYPTION KEY","DATABASE HADR","DATABASE SCOPED CONFIGURATION","DATABASE SCOPED CREDENTIAL","DATABASE SET","DATEFIRST","DATEFORMAT","DEADLOCK_PRIORITY","DENY","DENY XML","DISABLE TRIGGER","ENABLE TRIGGER","END CONVERSATION","ENDPOINT","EVENT NOTIFICATION","EVENT SESSION","EXECUTE AS","EXTERNAL DATA SOURCE","EXTERNAL FILE FORMAT","EXTERNAL LANGUAGE","EXTERNAL LIBRARY","EXTERNAL RESOURCE POOL","EXTERNAL TABLE","FIPS_FLAGGER","FMTONLY","FORCEPLAN","FULLTEXT CATALOG","FULLTEXT INDEX","FULLTEXT STOPLIST","FUNCTION","GET CONVERSATION GROUP","GET_TRANSMISSION_STATUS","GRANT","GRANT XML","IDENTITY_INSERT","IMPLICIT_TRANSACTIONS","INDEX","LANGUAGE","LOCK_TIMEOUT","LOGIN","MASTER KEY","MESSAGE TYPE","MOVE CONVERSATION","NOCOUNT","NOEXEC","NUMERIC_ROUNDABORT","OFFSETS","OPEN MASTER KEY","OPEN SYMMETRIC KEY","PARSEONLY","PARTITION FUNCTION","PARTITION SCHEME","PROCEDURE","QUERY_GOVERNOR_COST_LIMIT","QUEUE","QUOTED_IDENTIFIER","RECEIVE","REMOTE SERVICE BINDING","REMOTE_PROC_TRANSACTIONS","RESOURCE GOVERNOR","RESOURCE POOL","RESTORE","RESTORE FILELISTONLY","RESTORE HEADERONLY","RESTORE LABELONLY","RESTORE MASTER KEY","RESTORE REWINDONLY","RESTORE SERVICE MASTER KEY","RESTORE VERIFYONLY","REVERT","REVOKE","REVOKE XML","ROLE","ROUTE","ROWCOUNT","RULE","SCHEMA","SEARCH PROPERTY LIST","SECURITY POLICY","SELECTIVE XML INDEX","SEND","SENSITIVITY CLASSIFICATION","SEQUENCE","SERVER AUDIT","SERVER AUDIT SPECIFICATION","SERVER CONFIGURATION","SERVER ROLE","SERVICE","SERVICE MASTER KEY","SETUSER","SHOWPLAN_ALL","SHOWPLAN_TEXT","SHOWPLAN_XML","SIGNATURE","SPATIAL INDEX","STATISTICS","STATISTICS IO","STATISTICS PROFILE","STATISTICS TIME","STATISTICS XML","SYMMETRIC KEY","SYNONYM","TABLE","TABLE IDENTITY","TEXTSIZE","TRANSACTION ISOLATION LEVEL","TRIGGER","TYPE","UPDATE STATISTICS","USER","WORKLOAD GROUP","XACT_ABORT","XML INDEX","XML SCHEMA COLLECTION"]),Jo=v(["UNION [ALL]","EXCEPT","INTERSECT"]),qo=v(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","{CROSS | OUTER} APPLY"]),Qo=v(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE} BETWEEN"]),Zo={name:"transactsql",tokenizerOptions:{reservedSelect:ko,reservedClauses:[...Ko,..._r,...TT],reservedSetOperations:Jo,reservedJoins:qo,reservedPhrases:Qo,reservedKeywords:$o,reservedDataTypes:Xo,reservedFunctionNames:xo,nestedBlockComments:!0,stringTypes:[{quote:"''-qq",prefixes:["N"]}],identTypes:['""-qq',"[]"],identChars:{first:"#@",rest:"#@$"},paramTypes:{named:["@"],quoted:["@"]},operators:["%","&","|","^","~","!<","!>","+=","-=","*=","/=","%=","|=","&=","^=","::",":"],propertyAccessOperators:[".."]},formatOptions:{alwaysDenseOperators:["::"],onelineClauses:[..._r,...TT],tabularOnelineClauses:TT}},jo=["ADD","ALL","ALTER","ANALYZE","AND","AS","ASC","ASENSITIVE","BEFORE","BETWEEN","_BINARY","BOTH","BY","CALL","CASCADE","CASE","CHANGE","CHECK","COLLATE","COLUMN","CONDITION","CONSTRAINT","CONTINUE","CONVERT","CREATE","CROSS","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DATABASES","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DECLARE","DEFAULT","DELAYED","DELETE","DESC","DESCRIBE","DETERMINISTIC","DISTINCT","DISTINCTROW","DIV","DROP","DUAL","EACH","ELSE","ELSEIF","ENCLOSED","ESCAPED","EXCEPT","EXISTS","EXIT","EXPLAIN","EXTRA_JOIN","FALSE","FETCH","FOR","FORCE","FORCE_COMPILED_MODE","FORCE_INTERPRETER_MODE","FOREIGN","FROM","FULL","FULLTEXT","GRANT","GROUP","HAVING","HEARTBEAT_NO_LOGGING","HIGH_PRIORITY","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IF","IGNORE","IN","INDEX","INFILE","INNER","INOUT","INSENSITIVE","INSERT","IN","_INTERNAL_DYNAMIC_TYPECAST","INTERSECT","INTERVAL","INTO","ITERATE","JOIN","KEY","KEYS","KILL","LEADING","LEAVE","LEFT","LIKE","LIMIT","LINES","LOAD","LOCALTIME","LOCALTIMESTAMP","LOCK","LOOP","LOW_PRIORITY","MATCH","MAXVALUE","MINUS","MINUTE_MICROSECOND","MINUTE_SECOND","MOD","MODIFIES","NATURAL","NO_QUERY_REWRITE","NOT","NO_WRITE_TO_BINLOG","NO_QUERY_REWRITE","NULL","ON","OPTIMIZE","OPTION","OPTIONALLY","OR","ORDER","OUT","OUTER","OUTFILE","OVER","PRIMARY","PROCEDURE","PURGE","RANGE","READ","READS","REFERENCES","REGEXP","RELEASE","RENAME","REPEAT","REPLACE","REQUIRE","RESTRICT","RETURN","REVOKE","RIGHT","RIGHT_ANTI_JOIN","RIGHT_SEMI_JOIN","RIGHT_STRAIGHT_JOIN","RLIKE","SCHEMA","SCHEMAS","SECOND_MICROSECOND","SELECT","SEMI_JOIN","SENSITIVE","SEPARATOR","SET","SHOW","SIGNAL","SPATIAL","SPECIFIC","SQL","SQL_BIG_RESULT","SQL_BUFFER_RESULT","SQL_CACHE","SQL_CALC_FOUND_ROWS","SQLEXCEPTION","SQL_NO_CACHE","SQL_NO_LOGGING","SQL_SMALL_RESULT","SQLSTATE","SQLWARNING","STRAIGHT_JOIN","TABLE","TERMINATED","THEN","TO","TRAILING","TRIGGER","TRUE","UNBOUNDED","UNDO","UNION","UNIQUE","UNLOCK","UPDATE","USAGE","USE","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","_UTF8","VALUES","WHEN","WHERE","WHILE","WINDOW","WITH","WITHIN","WRITE","XOR","YEAR_MONTH","ZEROFILL"],zo=["BIGINT","BINARY","BIT","BLOB","CHAR","CHARACTER","DATETIME","DEC","DECIMAL","DOUBLE PRECISION","DOUBLE","ENUM","FIXED","FLOAT","FLOAT4","FLOAT8","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","LONG","LONGBLOB","LONGTEXT","MEDIUMBLOB","MEDIUMINT","MEDIUMTEXT","MIDDLEINT","NATIONAL CHAR","NATIONAL VARCHAR","NUMERIC","PRECISION","REAL","SMALLINT","TEXT","TIME","TIMESTAMP","TINYBLOB","TINYINT","TINYTEXT","UNSIGNED","VARBINARY","VARCHAR","VARCHARACTER","YEAR"],eO=["ABS","ACOS","ADDDATE","ADDTIME","AES_DECRYPT","AES_ENCRYPT","ANY_VALUE","APPROX_COUNT_DISTINCT","APPROX_COUNT_DISTINCT_ACCUMULATE","APPROX_COUNT_DISTINCT_COMBINE","APPROX_COUNT_DISTINCT_ESTIMATE","APPROX_GEOGRAPHY_INTERSECTS","APPROX_PERCENTILE","ASCII","ASIN","ATAN","ATAN2","AVG","BIN","BINARY","BIT_AND","BIT_COUNT","BIT_OR","BIT_XOR","CAST","CEIL","CEILING","CHAR","CHARACTER_LENGTH","CHAR_LENGTH","CHARSET","COALESCE","COERCIBILITY","COLLATION","COLLECT","CONCAT","CONCAT_WS","CONNECTION_ID","CONV","CONVERT","CONVERT_TZ","COS","COT","COUNT","CUME_DIST","CURDATE","CURRENT_DATE","CURRENT_ROLE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURTIME","DATABASE","DATE","DATE_ADD","DATEDIFF","DATE_FORMAT","DATE_SUB","DATE_TRUNC","DAY","DAYNAME","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","DECODE","DEFAULT","DEGREES","DENSE_RANK","DIV","DOT_PRODUCT","ELT","EUCLIDEAN_DISTANCE","EXP","EXTRACT","FIELD","FIRST","FIRST_VALUE","FLOOR","FORMAT","FOUND_ROWS","FROM_BASE64","FROM_DAYS","FROM_UNIXTIME","GEOGRAPHY_AREA","GEOGRAPHY_CONTAINS","GEOGRAPHY_DISTANCE","GEOGRAPHY_INTERSECTS","GEOGRAPHY_LATITUDE","GEOGRAPHY_LENGTH","GEOGRAPHY_LONGITUDE","GEOGRAPHY_POINT","GEOGRAPHY_WITHIN_DISTANCE","GEOMETRY_AREA","GEOMETRY_CONTAINS","GEOMETRY_DISTANCE","GEOMETRY_FILTER","GEOMETRY_INTERSECTS","GEOMETRY_LENGTH","GEOMETRY_POINT","GEOMETRY_WITHIN_DISTANCE","GEOMETRY_X","GEOMETRY_Y","GREATEST","GROUPING","GROUP_CONCAT","HEX","HIGHLIGHT","HOUR","ICU_VERSION","IF","IFNULL","INET_ATON","INET_NTOA","INET6_ATON","INET6_NTOA","INITCAP","INSERT","INSTR","INTERVAL","IS","IS NULL","JSON_AGG","JSON_ARRAY_CONTAINS_DOUBLE","JSON_ARRAY_CONTAINS_JSON","JSON_ARRAY_CONTAINS_STRING","JSON_ARRAY_PUSH_DOUBLE","JSON_ARRAY_PUSH_JSON","JSON_ARRAY_PUSH_STRING","JSON_DELETE_KEY","JSON_EXTRACT_DOUBLE","JSON_EXTRACT_JSON","JSON_EXTRACT_STRING","JSON_EXTRACT_BIGINT","JSON_GET_TYPE","JSON_LENGTH","JSON_SET_DOUBLE","JSON_SET_JSON","JSON_SET_STRING","JSON_SPLICE_DOUBLE","JSON_SPLICE_JSON","JSON_SPLICE_STRING","LAG","LAST_DAY","LAST_VALUE","LCASE","LEAD","LEAST","LEFT","LENGTH","LIKE","LN","LOCALTIME","LOCALTIMESTAMP","LOCATE","LOG","LOG10","LOG2","LPAD","LTRIM","MATCH","MAX","MD5","MEDIAN","MICROSECOND","MIN","MINUTE","MOD","MONTH","MONTHNAME","MONTHS_BETWEEN","NOT","NOW","NTH_VALUE","NTILE","NULLIF","OCTET_LENGTH","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","PI","PIVOT","POSITION","POW","POWER","QUARTER","QUOTE","RADIANS","RAND","RANK","REGEXP","REPEAT","REPLACE","REVERSE","RIGHT","RLIKE","ROUND","ROW_COUNT","ROW_NUMBER","RPAD","RTRIM","SCALAR","SCHEMA","SEC_TO_TIME","SHA1","SHA2","SIGMOID","SIGN","SIN","SLEEP","SPLIT","SOUNDEX","SOUNDS LIKE","SOURCE_POS_WAIT","SPACE","SQRT","STDDEV","STDDEV_POP","STDDEV_SAMP","STR_TO_DATE","SUBDATE","SUBSTR","SUBSTRING","SUBSTRING_INDEX","SUM","SYS_GUID","TAN","TIME","TIMEDIFF","TIME_BUCKET","TIME_FORMAT","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TIME_TO_SEC","TO_BASE64","TO_CHAR","TO_DAYS","TO_JSON","TO_NUMBER","TO_SECONDS","TO_TIMESTAMP","TRIM","TRUNC","TRUNCATE","UCASE","UNHEX","UNIX_TIMESTAMP","UPDATEXML","UPPER","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","UUID","VALUES","VARIANCE","VAR_POP","VAR_SAMP","VECTOR_SUB","VERSION","WEEK","WEEKDAY","WEEKOFYEAR","YEAR"],EO=v(["SELECT [ALL | DISTINCT | DISTINCTROW]"]),tO=v(["WITH","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT [IGNORE] [INTO]","VALUES","REPLACE [INTO]","ON DUPLICATE KEY UPDATE","SET","CREATE [OR REPLACE] [TEMPORARY] PROCEDURE [IF NOT EXISTS]","CREATE [OR REPLACE] [EXTERNAL] FUNCTION"]),Lr=v(["CREATE [ROWSTORE] [REFERENCE | TEMPORARY | GLOBAL TEMPORARY] TABLE [IF NOT EXISTS]"]),rT=v(["CREATE VIEW","UPDATE","DELETE [FROM]","DROP [TEMPORARY] TABLE [IF EXISTS]","ALTER [ONLINE] TABLE","ADD [COLUMN]","ADD [UNIQUE] {INDEX | KEY}","DROP [COLUMN]","MODIFY [COLUMN]","CHANGE","RENAME [TO | AS]","TRUNCATE [TABLE]","ADD AGGREGATOR","ADD LEAF","AGGREGATOR SET AS MASTER","ALTER DATABASE","ALTER PIPELINE","ALTER RESOURCE POOL","ALTER USER","ALTER VIEW","ANALYZE TABLE","ATTACH DATABASE","ATTACH LEAF","ATTACH LEAF ALL","BACKUP DATABASE","BINLOG","BOOTSTRAP AGGREGATOR","CACHE INDEX","CALL","CHANGE","CHANGE MASTER TO","CHANGE REPLICATION FILTER","CHANGE REPLICATION SOURCE TO","CHECK BLOB CHECKSUM","CHECK TABLE","CHECKSUM TABLE","CLEAR ORPHAN DATABASES","CLONE","COMMIT","CREATE DATABASE","CREATE GROUP","CREATE INDEX","CREATE LINK","CREATE MILESTONE","CREATE PIPELINE","CREATE RESOURCE POOL","CREATE ROLE","CREATE USER","DEALLOCATE PREPARE","DESCRIBE","DETACH DATABASE","DETACH PIPELINE","DROP DATABASE","DROP FUNCTION","DROP INDEX","DROP LINK","DROP PIPELINE","DROP PROCEDURE","DROP RESOURCE POOL","DROP ROLE","DROP USER","DROP VIEW","EXECUTE","EXPLAIN","FLUSH","FORCE","GRANT","HANDLER","HELP","KILL CONNECTION","KILLALL QUERIES","LOAD DATA","LOAD INDEX INTO CACHE","LOAD XML","LOCK INSTANCE FOR BACKUP","LOCK TABLES","MASTER_POS_WAIT","OPTIMIZE TABLE","PREPARE","PURGE BINARY LOGS","REBALANCE PARTITIONS","RELEASE SAVEPOINT","REMOVE AGGREGATOR","REMOVE LEAF","REPAIR TABLE","REPLACE","REPLICATE DATABASE","RESET","RESET MASTER","RESET PERSIST","RESET REPLICA","RESET SLAVE","RESTART","RESTORE DATABASE","RESTORE REDUNDANCY","REVOKE","ROLLBACK","ROLLBACK TO SAVEPOINT","SAVEPOINT","SET CHARACTER SET","SET DEFAULT ROLE","SET NAMES","SET PASSWORD","SET RESOURCE GROUP","SET ROLE","SET TRANSACTION","SHOW","SHOW CHARACTER SET","SHOW COLLATION","SHOW COLUMNS","SHOW CREATE DATABASE","SHOW CREATE FUNCTION","SHOW CREATE PIPELINE","SHOW CREATE PROCEDURE","SHOW CREATE TABLE","SHOW CREATE USER","SHOW CREATE VIEW","SHOW DATABASES","SHOW ENGINE","SHOW ENGINES","SHOW ERRORS","SHOW FUNCTION CODE","SHOW FUNCTION STATUS","SHOW GRANTS","SHOW INDEX","SHOW MASTER STATUS","SHOW OPEN TABLES","SHOW PLUGINS","SHOW PRIVILEGES","SHOW PROCEDURE CODE","SHOW PROCEDURE STATUS","SHOW PROCESSLIST","SHOW PROFILE","SHOW PROFILES","SHOW RELAYLOG EVENTS","SHOW REPLICA STATUS","SHOW REPLICAS","SHOW SLAVE","SHOW SLAVE HOSTS","SHOW STATUS","SHOW TABLE STATUS","SHOW TABLES","SHOW VARIABLES","SHOW WARNINGS","SHUTDOWN","SNAPSHOT DATABASE","SOURCE_POS_WAIT","START GROUP_REPLICATION","START PIPELINE","START REPLICA","START SLAVE","START TRANSACTION","STOP GROUP_REPLICATION","STOP PIPELINE","STOP REPLICA","STOP REPLICATING","STOP SLAVE","TEST PIPELINE","UNLOCK INSTANCE","UNLOCK TABLES","USE","XA","ITERATE","LEAVE","LOOP","REPEAT","RETURN","WHILE"]),TO=v(["UNION [ALL | DISTINCT]","EXCEPT","INTERSECT","MINUS"]),rO=v(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL {LEFT | RIGHT} [OUTER] JOIN","STRAIGHT_JOIN"]),RO=v(["ON DELETE","ON UPDATE","CHARACTER SET","{ROWS | RANGE} BETWEEN","IDENTIFIED BY"]),nO={name:"singlestoredb",tokenizerOptions:{reservedSelect:EO,reservedClauses:[...tO,...Lr,...rT],reservedSetOperations:TO,reservedJoins:rO,reservedPhrases:RO,reservedKeywords:jo,reservedDataTypes:zo,reservedFunctionNames:eO,stringTypes:['""-qq-bs',"''-qq-bs",{quote:"''-raw",prefixes:["B","X"],requirePrefix:!0}],identTypes:["``"],identChars:{first:"$",rest:"$",allowFirstCharNumber:!0},variableTypes:[{regex:"@@?[A-Za-z0-9_$]+"},{quote:"``",prefixes:["@"],requirePrefix:!0}],lineCommentTypes:["--","#"],operators:[":=","&","|","^","~","<<",">>","<=>","&&","||","::","::$","::%",":>","!:>","*.*"],postProcess:bt},formatOptions:{alwaysDenseOperators:["::","::$","::%"],onelineClauses:[...Lr,...rT],tabularOnelineClauses:rT}},AO=["ABS","ACOS","ACOSH","ADD_MONTHS","ALL_USER_NAMES","ANY_VALUE","APPROX_COUNT_DISTINCT","APPROX_PERCENTILE","APPROX_PERCENTILE_ACCUMULATE","APPROX_PERCENTILE_COMBINE","APPROX_PERCENTILE_ESTIMATE","APPROX_TOP_K","APPROX_TOP_K_ACCUMULATE","APPROX_TOP_K_COMBINE","APPROX_TOP_K_ESTIMATE","APPROXIMATE_JACCARD_INDEX","APPROXIMATE_SIMILARITY","ARRAY_AGG","ARRAY_APPEND","ARRAY_CAT","ARRAY_COMPACT","ARRAY_CONSTRUCT","ARRAY_CONSTRUCT_COMPACT","ARRAY_CONTAINS","ARRAY_INSERT","ARRAY_INTERSECTION","ARRAY_POSITION","ARRAY_PREPEND","ARRAY_SIZE","ARRAY_SLICE","ARRAY_TO_STRING","ARRAY_UNION_AGG","ARRAY_UNIQUE_AGG","ARRAYS_OVERLAP","AS_ARRAY","AS_BINARY","AS_BOOLEAN","AS_CHAR","AS_VARCHAR","AS_DATE","AS_DECIMAL","AS_NUMBER","AS_DOUBLE","AS_REAL","AS_INTEGER","AS_OBJECT","AS_TIME","AS_TIMESTAMP_LTZ","AS_TIMESTAMP_NTZ","AS_TIMESTAMP_TZ","ASCII","ASIN","ASINH","ATAN","ATAN2","ATANH","AUTO_REFRESH_REGISTRATION_HISTORY","AUTOMATIC_CLUSTERING_HISTORY","AVG","BASE64_DECODE_BINARY","BASE64_DECODE_STRING","BASE64_ENCODE","BIT_LENGTH","BITAND","BITAND_AGG","BITMAP_BIT_POSITION","BITMAP_BUCKET_NUMBER","BITMAP_CONSTRUCT_AGG","BITMAP_COUNT","BITMAP_OR_AGG","BITNOT","BITOR","BITOR_AGG","BITSHIFTLEFT","BITSHIFTRIGHT","BITXOR","BITXOR_AGG","BOOLAND","BOOLAND_AGG","BOOLNOT","BOOLOR","BOOLOR_AGG","BOOLXOR","BOOLXOR_AGG","BUILD_SCOPED_FILE_URL","BUILD_STAGE_FILE_URL","CASE","CAST","CBRT","CEIL","CHARINDEX","CHECK_JSON","CHECK_XML","CHR","CHAR","COALESCE","COLLATE","COLLATION","COMPLETE_TASK_GRAPHS","COMPRESS","CONCAT","CONCAT_WS","CONDITIONAL_CHANGE_EVENT","CONDITIONAL_TRUE_EVENT","CONTAINS","CONVERT_TIMEZONE","COPY_HISTORY","CORR","COS","COSH","COT","COUNT","COUNT_IF","COVAR_POP","COVAR_SAMP","CUME_DIST","CURRENT_ACCOUNT","CURRENT_AVAILABLE_ROLES","CURRENT_CLIENT","CURRENT_DATABASE","CURRENT_DATE","CURRENT_IP_ADDRESS","CURRENT_REGION","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_SCHEMAS","CURRENT_SECONDARY_ROLES","CURRENT_SESSION","CURRENT_STATEMENT","CURRENT_TASK_GRAPHS","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TRANSACTION","CURRENT_USER","CURRENT_VERSION","CURRENT_WAREHOUSE","DATA_TRANSFER_HISTORY","DATABASE_REFRESH_HISTORY","DATABASE_REFRESH_PROGRESS","DATABASE_REFRESH_PROGRESS_BY_JOB","DATABASE_STORAGE_USAGE_HISTORY","DATE_FROM_PARTS","DATE_PART","DATE_TRUNC","DATEADD","DATEDIFF","DAYNAME","DECODE","DECOMPRESS_BINARY","DECOMPRESS_STRING","DECRYPT","DECRYPT_RAW","DEGREES","DENSE_RANK","DIV0","EDITDISTANCE","ENCRYPT","ENCRYPT_RAW","ENDSWITH","EQUAL_NULL","EXP","EXPLAIN_JSON","EXTERNAL_FUNCTIONS_HISTORY","EXTERNAL_TABLE_FILES","EXTERNAL_TABLE_FILE_REGISTRATION_HISTORY","EXTRACT","EXTRACT_SEMANTIC_CATEGORIES","FACTORIAL","FIRST_VALUE","FLATTEN","FLOOR","GENERATE_COLUMN_DESCRIPTION","GENERATOR","GET","GET_ABSOLUTE_PATH","GET_DDL","GET_IGNORE_CASE","GET_OBJECT_REFERENCES","GET_PATH","GET_PRESIGNED_URL","GET_RELATIVE_PATH","GET_STAGE_LOCATION","GETBIT","GREATEST","GROUPING","GROUPING_ID","HASH","HASH_AGG","HAVERSINE","HEX_DECODE_BINARY","HEX_DECODE_STRING","HEX_ENCODE","HLL","HLL_ACCUMULATE","HLL_COMBINE","HLL_ESTIMATE","HLL_EXPORT","HLL_IMPORT","HOUR","MINUTE","SECOND","IFF","IFNULL","ILIKE","ILIKE ANY","INFER_SCHEMA","INITCAP","INSERT","INVOKER_ROLE","INVOKER_SHARE","IS_ARRAY","IS_BINARY","IS_BOOLEAN","IS_CHAR","IS_VARCHAR","IS_DATE","IS_DATE_VALUE","IS_DECIMAL","IS_DOUBLE","IS_REAL","IS_GRANTED_TO_INVOKER_ROLE","IS_INTEGER","IS_NULL_VALUE","IS_OBJECT","IS_ROLE_IN_SESSION","IS_TIME","IS_TIMESTAMP_LTZ","IS_TIMESTAMP_NTZ","IS_TIMESTAMP_TZ","JAROWINKLER_SIMILARITY","JSON_EXTRACT_PATH_TEXT","KURTOSIS","LAG","LAST_DAY","LAST_QUERY_ID","LAST_TRANSACTION","LAST_VALUE","LEAD","LEAST","LEFT","LENGTH","LEN","LIKE","LIKE ALL","LIKE ANY","LISTAGG","LN","LOCALTIME","LOCALTIMESTAMP","LOG","LOGIN_HISTORY","LOGIN_HISTORY_BY_USER","LOWER","LPAD","LTRIM","MATERIALIZED_VIEW_REFRESH_HISTORY","MD5","MD5_HEX","MD5_BINARY","MD5_NUMBER — Obsoleted","MD5_NUMBER_LOWER64","MD5_NUMBER_UPPER64","MEDIAN","MIN","MAX","MINHASH","MINHASH_COMBINE","MOD","MODE","MONTHNAME","MONTHS_BETWEEN","NEXT_DAY","NORMAL","NTH_VALUE","NTILE","NULLIF","NULLIFZERO","NVL","NVL2","OBJECT_AGG","OBJECT_CONSTRUCT","OBJECT_CONSTRUCT_KEEP_NULL","OBJECT_DELETE","OBJECT_INSERT","OBJECT_KEYS","OBJECT_PICK","OCTET_LENGTH","PARSE_IP","PARSE_JSON","PARSE_URL","PARSE_XML","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","PI","PIPE_USAGE_HISTORY","POLICY_CONTEXT","POLICY_REFERENCES","POSITION","POW","POWER","PREVIOUS_DAY","QUERY_ACCELERATION_HISTORY","QUERY_HISTORY","QUERY_HISTORY_BY_SESSION","QUERY_HISTORY_BY_USER","QUERY_HISTORY_BY_WAREHOUSE","RADIANS","RANDOM","RANDSTR","RANK","RATIO_TO_REPORT","REGEXP","REGEXP_COUNT","REGEXP_INSTR","REGEXP_LIKE","REGEXP_REPLACE","REGEXP_SUBSTR","REGEXP_SUBSTR_ALL","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","REGR_VALX","REGR_VALY","REPEAT","REPLACE","REPLICATION_GROUP_REFRESH_HISTORY","REPLICATION_GROUP_REFRESH_PROGRESS","REPLICATION_GROUP_REFRESH_PROGRESS_BY_JOB","REPLICATION_GROUP_USAGE_HISTORY","REPLICATION_USAGE_HISTORY","REST_EVENT_HISTORY","RESULT_SCAN","REVERSE","RIGHT","RLIKE","ROUND","ROW_NUMBER","RPAD","RTRIM","RTRIMMED_LENGTH","SEARCH_OPTIMIZATION_HISTORY","SEQ1","SEQ2","SEQ4","SEQ8","SERVERLESS_TASK_HISTORY","SHA1","SHA1_HEX","SHA1_BINARY","SHA2","SHA2_HEX","SHA2_BINARY","SIGN","SIN","SINH","SKEW","SOUNDEX","SPACE","SPLIT","SPLIT_PART","SPLIT_TO_TABLE","SQRT","SQUARE","ST_AREA","ST_ASEWKB","ST_ASEWKT","ST_ASGEOJSON","ST_ASWKB","ST_ASBINARY","ST_ASWKT","ST_ASTEXT","ST_AZIMUTH","ST_CENTROID","ST_COLLECT","ST_CONTAINS","ST_COVEREDBY","ST_COVERS","ST_DIFFERENCE","ST_DIMENSION","ST_DISJOINT","ST_DISTANCE","ST_DWITHIN","ST_ENDPOINT","ST_ENVELOPE","ST_GEOGFROMGEOHASH","ST_GEOGPOINTFROMGEOHASH","ST_GEOGRAPHYFROMWKB","ST_GEOGRAPHYFROMWKT","ST_GEOHASH","ST_GEOMETRYFROMWKB","ST_GEOMETRYFROMWKT","ST_HAUSDORFFDISTANCE","ST_INTERSECTION","ST_INTERSECTS","ST_LENGTH","ST_MAKEGEOMPOINT","ST_GEOM_POINT","ST_MAKELINE","ST_MAKEPOINT","ST_POINT","ST_MAKEPOLYGON","ST_POLYGON","ST_NPOINTS","ST_NUMPOINTS","ST_PERIMETER","ST_POINTN","ST_SETSRID","ST_SIMPLIFY","ST_SRID","ST_STARTPOINT","ST_SYMDIFFERENCE","ST_UNION","ST_WITHIN","ST_X","ST_XMAX","ST_XMIN","ST_Y","ST_YMAX","ST_YMIN","STAGE_DIRECTORY_FILE_REGISTRATION_HISTORY","STAGE_STORAGE_USAGE_HISTORY","STARTSWITH","STDDEV","STDDEV_POP","STDDEV_SAMP","STRIP_NULL_VALUE","STRTOK","STRTOK_SPLIT_TO_TABLE","STRTOK_TO_ARRAY","SUBSTR","SUBSTRING","SUM","SYSDATE","SYSTEM$ABORT_SESSION","SYSTEM$ABORT_TRANSACTION","SYSTEM$AUTHORIZE_PRIVATELINK","SYSTEM$AUTHORIZE_STAGE_PRIVATELINK_ACCESS","SYSTEM$BEHAVIOR_CHANGE_BUNDLE_STATUS","SYSTEM$CANCEL_ALL_QUERIES","SYSTEM$CANCEL_QUERY","SYSTEM$CLUSTERING_DEPTH","SYSTEM$CLUSTERING_INFORMATION","SYSTEM$CLUSTERING_RATIO ","SYSTEM$CURRENT_USER_TASK_NAME","SYSTEM$DATABASE_REFRESH_HISTORY ","SYSTEM$DATABASE_REFRESH_PROGRESS","SYSTEM$DATABASE_REFRESH_PROGRESS_BY_JOB ","SYSTEM$DISABLE_BEHAVIOR_CHANGE_BUNDLE","SYSTEM$DISABLE_DATABASE_REPLICATION","SYSTEM$ENABLE_BEHAVIOR_CHANGE_BUNDLE","SYSTEM$ESTIMATE_QUERY_ACCELERATION","SYSTEM$ESTIMATE_SEARCH_OPTIMIZATION_COSTS","SYSTEM$EXPLAIN_JSON_TO_TEXT","SYSTEM$EXPLAIN_PLAN_JSON","SYSTEM$EXTERNAL_TABLE_PIPE_STATUS","SYSTEM$GENERATE_SAML_CSR","SYSTEM$GENERATE_SCIM_ACCESS_TOKEN","SYSTEM$GET_AWS_SNS_IAM_POLICY","SYSTEM$GET_PREDECESSOR_RETURN_VALUE","SYSTEM$GET_PRIVATELINK","SYSTEM$GET_PRIVATELINK_AUTHORIZED_ENDPOINTS","SYSTEM$GET_PRIVATELINK_CONFIG","SYSTEM$GET_SNOWFLAKE_PLATFORM_INFO","SYSTEM$GET_TAG","SYSTEM$GET_TAG_ALLOWED_VALUES","SYSTEM$GET_TAG_ON_CURRENT_COLUMN","SYSTEM$GET_TAG_ON_CURRENT_TABLE","SYSTEM$GLOBAL_ACCOUNT_SET_PARAMETER","SYSTEM$LAST_CHANGE_COMMIT_TIME","SYSTEM$LINK_ACCOUNT_OBJECTS_BY_NAME","SYSTEM$MIGRATE_SAML_IDP_REGISTRATION","SYSTEM$PIPE_FORCE_RESUME","SYSTEM$PIPE_STATUS","SYSTEM$REVOKE_PRIVATELINK","SYSTEM$REVOKE_STAGE_PRIVATELINK_ACCESS","SYSTEM$SET_RETURN_VALUE","SYSTEM$SHOW_OAUTH_CLIENT_SECRETS","SYSTEM$STREAM_GET_TABLE_TIMESTAMP","SYSTEM$STREAM_HAS_DATA","SYSTEM$TASK_DEPENDENTS_ENABLE","SYSTEM$TYPEOF","SYSTEM$USER_TASK_CANCEL_ONGOING_EXECUTIONS","SYSTEM$VERIFY_EXTERNAL_OAUTH_TOKEN","SYSTEM$WAIT","SYSTEM$WHITELIST","SYSTEM$WHITELIST_PRIVATELINK","TAG_REFERENCES","TAG_REFERENCES_ALL_COLUMNS","TAG_REFERENCES_WITH_LINEAGE","TAN","TANH","TASK_DEPENDENTS","TASK_HISTORY","TIME_FROM_PARTS","TIME_SLICE","TIMEADD","TIMEDIFF","TIMESTAMP_FROM_PARTS","TIMESTAMPADD","TIMESTAMPDIFF","TO_ARRAY","TO_BINARY","TO_BOOLEAN","TO_CHAR","TO_VARCHAR","TO_DATE","DATE","TO_DECIMAL","TO_NUMBER","TO_NUMERIC","TO_DOUBLE","TO_GEOGRAPHY","TO_GEOMETRY","TO_JSON","TO_OBJECT","TO_TIME","TIME","TO_TIMESTAMP","TO_TIMESTAMP_LTZ","TO_TIMESTAMP_NTZ","TO_TIMESTAMP_TZ","TO_VARIANT","TO_XML","TRANSLATE","TRIM","TRUNCATE","TRUNC","TRUNC","TRY_BASE64_DECODE_BINARY","TRY_BASE64_DECODE_STRING","TRY_CAST","TRY_HEX_DECODE_BINARY","TRY_HEX_DECODE_STRING","TRY_PARSE_JSON","TRY_TO_BINARY","TRY_TO_BOOLEAN","TRY_TO_DATE","TRY_TO_DECIMAL","TRY_TO_NUMBER","TRY_TO_NUMERIC","TRY_TO_DOUBLE","TRY_TO_GEOGRAPHY","TRY_TO_GEOMETRY","TRY_TO_TIME","TRY_TO_TIMESTAMP","TRY_TO_TIMESTAMP_LTZ","TRY_TO_TIMESTAMP_NTZ","TRY_TO_TIMESTAMP_TZ","TYPEOF","UNICODE","UNIFORM","UPPER","UUID_STRING","VALIDATE","VALIDATE_PIPE_LOAD","VAR_POP","VAR_SAMP","VARIANCE","VARIANCE_SAMP","VARIANCE_POP","WAREHOUSE_LOAD_HISTORY","WAREHOUSE_METERING_HISTORY","WIDTH_BUCKET","XMLGET","YEAR","YEAROFWEEK","YEAROFWEEKISO","DAY","DAYOFMONTH","DAYOFWEEK","DAYOFWEEKISO","DAYOFYEAR","WEEK","WEEK","WEEKOFYEAR","WEEKISO","MONTH","QUARTER","ZEROIFNULL","ZIPF"],sO=["ACCOUNT","ALL","ALTER","AND","ANY","AS","BETWEEN","BY","CASE","CAST","CHECK","COLUMN","CONNECT","CONNECTION","CONSTRAINT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","DATABASE","DELETE","DISTINCT","DROP","ELSE","EXISTS","FALSE","FOLLOWING","FOR","FROM","FULL","GRANT","GROUP","GSCLUSTER","HAVING","ILIKE","IN","INCREMENT","INNER","INSERT","INTERSECT","INTO","IS","ISSUE","JOIN","LATERAL","LEFT","LIKE","LOCALTIME","LOCALTIMESTAMP","MINUS","NATURAL","NOT","NULL","OF","ON","OR","ORDER","ORGANIZATION","QUALIFY","REGEXP","REVOKE","RIGHT","RLIKE","ROW","ROWS","SAMPLE","SCHEMA","SELECT","SET","SOME","START","TABLE","TABLESAMPLE","THEN","TO","TRIGGER","TRUE","TRY_CAST","UNION","UNIQUE","UPDATE","USING","VALUES","VIEW","WHEN","WHENEVER","WHERE","WITH","COMMENT"],SO=["NUMBER","DECIMAL","NUMERIC","INT","INTEGER","BIGINT","SMALLINT","TINYINT","BYTEINT","FLOAT","FLOAT4","FLOAT8","DOUBLE","DOUBLE PRECISION","REAL","VARCHAR","CHAR","CHARACTER","STRING","TEXT","BINARY","VARBINARY","BOOLEAN","DATE","DATETIME","TIME","TIMESTAMP","TIMESTAMP_LTZ","TIMESTAMP_NTZ","TIMESTAMP","TIMESTAMP_TZ","VARIANT","OBJECT","ARRAY","GEOGRAPHY","GEOMETRY"],oO=v(["SELECT [ALL | DISTINCT]"]),OO=v(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY","QUALIFY","LIMIT","OFFSET","FETCH [FIRST | NEXT]","INSERT [OVERWRITE] [ALL INTO | INTO | ALL | FIRST]","{THEN | ELSE} INTO","VALUES","SET","CLUSTER BY","[WITH] {MASKING POLICY | TAG | ROW ACCESS POLICY}","COPY GRANTS","USING TEMPLATE","MERGE INTO","WHEN MATCHED [AND]","THEN {UPDATE SET | DELETE}","WHEN NOT MATCHED THEN INSERT"]),Cr=v(["CREATE [OR REPLACE] [VOLATILE] TABLE [IF NOT EXISTS]","CREATE [OR REPLACE] [LOCAL | GLOBAL] {TEMP|TEMPORARY} TABLE [IF NOT EXISTS]"]),RT=v(["CREATE [OR REPLACE] [SECURE] [RECURSIVE] VIEW [IF NOT EXISTS]","UPDATE","DELETE FROM","DROP TABLE [IF EXISTS]","ALTER TABLE [IF EXISTS]","RENAME TO","SWAP WITH","[SUSPEND | RESUME] RECLUSTER","DROP CLUSTERING KEY","ADD [COLUMN]","RENAME COLUMN","{ALTER | MODIFY} [COLUMN]","DROP [COLUMN]","{ADD | ALTER | MODIFY | DROP} [CONSTRAINT]","RENAME CONSTRAINT","{ADD | DROP} SEARCH OPTIMIZATION","{SET | UNSET} TAG","{ADD | DROP} ROW ACCESS POLICY","DROP ALL ROW ACCESS POLICIES","{SET | DROP} DEFAULT","{SET | DROP} NOT NULL","[SET DATA] TYPE","UNSET COMMENT","{SET | UNSET} MASKING POLICY","TRUNCATE [TABLE] [IF EXISTS]","ALTER ACCOUNT","ALTER API INTEGRATION","ALTER CONNECTION","ALTER DATABASE","ALTER EXTERNAL TABLE","ALTER FAILOVER GROUP","ALTER FILE FORMAT","ALTER FUNCTION","ALTER INTEGRATION","ALTER MASKING POLICY","ALTER MATERIALIZED VIEW","ALTER NETWORK POLICY","ALTER NOTIFICATION INTEGRATION","ALTER PIPE","ALTER PROCEDURE","ALTER REPLICATION GROUP","ALTER RESOURCE MONITOR","ALTER ROLE","ALTER ROW ACCESS POLICY","ALTER SCHEMA","ALTER SECURITY INTEGRATION","ALTER SEQUENCE","ALTER SESSION","ALTER SESSION POLICY","ALTER SHARE","ALTER STAGE","ALTER STORAGE INTEGRATION","ALTER STREAM","ALTER TAG","ALTER TASK","ALTER USER","ALTER VIEW","ALTER WAREHOUSE","BEGIN","CALL","COMMIT","COPY INTO","CREATE ACCOUNT","CREATE API INTEGRATION","CREATE CONNECTION","CREATE DATABASE","CREATE EXTERNAL FUNCTION","CREATE EXTERNAL TABLE","CREATE FAILOVER GROUP","CREATE FILE FORMAT","CREATE FUNCTION","CREATE INTEGRATION","CREATE MANAGED ACCOUNT","CREATE MASKING POLICY","CREATE MATERIALIZED VIEW","CREATE NETWORK POLICY","CREATE NOTIFICATION INTEGRATION","CREATE PIPE","CREATE PROCEDURE","CREATE REPLICATION GROUP","CREATE RESOURCE MONITOR","CREATE ROLE","CREATE ROW ACCESS POLICY","CREATE SCHEMA","CREATE SECURITY INTEGRATION","CREATE SEQUENCE","CREATE SESSION POLICY","CREATE SHARE","CREATE STAGE","CREATE STORAGE INTEGRATION","CREATE STREAM","CREATE TAG","CREATE TASK","CREATE USER","CREATE WAREHOUSE","DELETE","DESCRIBE DATABASE","DESCRIBE EXTERNAL TABLE","DESCRIBE FILE FORMAT","DESCRIBE FUNCTION","DESCRIBE INTEGRATION","DESCRIBE MASKING POLICY","DESCRIBE MATERIALIZED VIEW","DESCRIBE NETWORK POLICY","DESCRIBE PIPE","DESCRIBE PROCEDURE","DESCRIBE RESULT","DESCRIBE ROW ACCESS POLICY","DESCRIBE SCHEMA","DESCRIBE SEQUENCE","DESCRIBE SESSION POLICY","DESCRIBE SHARE","DESCRIBE STAGE","DESCRIBE STREAM","DESCRIBE TABLE","DESCRIBE TASK","DESCRIBE TRANSACTION","DESCRIBE USER","DESCRIBE VIEW","DESCRIBE WAREHOUSE","DROP CONNECTION","DROP DATABASE","DROP EXTERNAL TABLE","DROP FAILOVER GROUP","DROP FILE FORMAT","DROP FUNCTION","DROP INTEGRATION","DROP MANAGED ACCOUNT","DROP MASKING POLICY","DROP MATERIALIZED VIEW","DROP NETWORK POLICY","DROP PIPE","DROP PROCEDURE","DROP REPLICATION GROUP","DROP RESOURCE MONITOR","DROP ROLE","DROP ROW ACCESS POLICY","DROP SCHEMA","DROP SEQUENCE","DROP SESSION POLICY","DROP SHARE","DROP STAGE","DROP STREAM","DROP TAG","DROP TASK","DROP USER","DROP VIEW","DROP WAREHOUSE","EXECUTE IMMEDIATE","EXECUTE TASK","EXPLAIN","GET","GRANT OWNERSHIP","GRANT ROLE","INSERT","LIST","MERGE","PUT","REMOVE","REVOKE ROLE","ROLLBACK","SHOW COLUMNS","SHOW CONNECTIONS","SHOW DATABASES","SHOW DATABASES IN FAILOVER GROUP","SHOW DATABASES IN REPLICATION GROUP","SHOW DELEGATED AUTHORIZATIONS","SHOW EXTERNAL FUNCTIONS","SHOW EXTERNAL TABLES","SHOW FAILOVER GROUPS","SHOW FILE FORMATS","SHOW FUNCTIONS","SHOW GLOBAL ACCOUNTS","SHOW GRANTS","SHOW INTEGRATIONS","SHOW LOCKS","SHOW MANAGED ACCOUNTS","SHOW MASKING POLICIES","SHOW MATERIALIZED VIEWS","SHOW NETWORK POLICIES","SHOW OBJECTS","SHOW ORGANIZATION ACCOUNTS","SHOW PARAMETERS","SHOW PIPES","SHOW PRIMARY KEYS","SHOW PROCEDURES","SHOW REGIONS","SHOW REPLICATION ACCOUNTS","SHOW REPLICATION DATABASES","SHOW REPLICATION GROUPS","SHOW RESOURCE MONITORS","SHOW ROLES","SHOW ROW ACCESS POLICIES","SHOW SCHEMAS","SHOW SEQUENCES","SHOW SESSION POLICIES","SHOW SHARES","SHOW SHARES IN FAILOVER GROUP","SHOW SHARES IN REPLICATION GROUP","SHOW STAGES","SHOW STREAMS","SHOW TABLES","SHOW TAGS","SHOW TASKS","SHOW TRANSACTIONS","SHOW USER FUNCTIONS","SHOW USERS","SHOW VARIABLES","SHOW VIEWS","SHOW WAREHOUSES","TRUNCATE MATERIALIZED VIEW","UNDROP DATABASE","UNDROP SCHEMA","UNDROP TABLE","UNDROP TAG","UNSET","USE DATABASE","USE ROLE","USE SCHEMA","USE SECONDARY ROLES","USE WAREHOUSE"]),iO=v(["UNION [ALL]","MINUS","EXCEPT","INTERSECT"]),aO=v(["[INNER] JOIN","[NATURAL] {LEFT | RIGHT | FULL} [OUTER] JOIN","{CROSS | NATURAL} JOIN"]),IO=v(["{ROWS | RANGE} BETWEEN","ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]"]),NO={name:"snowflake",tokenizerOptions:{reservedSelect:oO,reservedClauses:[...OO,...Cr,...RT],reservedSetOperations:iO,reservedJoins:aO,reservedPhrases:IO,reservedKeywords:sO,reservedDataTypes:SO,reservedFunctionNames:AO,stringTypes:["$$","''-qq-bs"],identTypes:['""-qq'],variableTypes:[{regex:"[$][1-9]\\\\d*"},{regex:"[$][_a-zA-Z][_a-zA-Z0-9$]*"}],extraParens:["[]"],identChars:{rest:"$"},lineCommentTypes:["--","//"],operators:["%","::","||","=>"],propertyAccessOperators:[":"]},formatOptions:{alwaysDenseOperators:["::"],onelineClauses:[...Cr,...RT],tabularOnelineClauses:RT}},St=E=>E[E.length-1],VR=E=>E.sort((e,T)=>T.length-e.length||e.localeCompare(T)),ft=E=>E.replace(/\\s+/gu," "),nT=E=>/\\n/.test(E),LE=E=>E.replace(/[.*+?^${}()|[\\]\\\\]/gu,"\\\\$&"),ur=/\\s+/uy,VE=E=>new RegExp(`(?:${E})`,"uy"),lO=E=>E.split("").map(e=>/ /gu.test(e)?"\\\\s+":`[${e.toUpperCase()}${e.toLowerCase()}]`).join(""),_O=E=>E+"(?:-"+E+")*",LO=({prefixes:E,requirePrefix:e})=>`(?:${E.map(lO).join("|")}${e?"":"|"})`,CO=E=>new RegExp(`(?:${E.map(LE).join("|")}).*?(?=\\r
|\\r|
|$)`,"uy"),cr=(E,e=[])=>{const T=E==="open"?0:1,t=["()",...e].map(r=>r[T]);return VE(t.map(LE).join("|"))},fr=E=>VE(`${VR(E).map(LE).join("|")}`),uO=({rest:E,dashes:e})=>E||e?`(?![${E||""}${e?"-":""}])`:"",hE=(E,e={})=>{if(E.length===0)return/^\\b$/u;const T=uO(e),t=VR(E).map(LE).join("|").replace(/ /gu,"\\\\s+");return new RegExp(`(?:${t})${T}\\\\b`,"iuy")},AT=(E,e)=>{if(!E.length)return;const T=E.map(LE).join("|");return VE(`(?:${T})(?:${e})`)},cO=()=>{const E={"<":">","[":"]","(":")","{":"}"},e="{left}(?:(?!{right}').)*?{right}",T=Object.entries(E).map(([A,s])=>e.replace(/{left}/g,LE(A)).replace(/{right}/g,LE(s))),t=LE(Object.keys(E).join(""));return`[Qq]'(?:${String.raw`(?<tag>[^\\s${t}])(?:(?!\\k<tag>').)*?\\k<tag>`}|${T.join("|")})'`},Pr={"``":"(?:`[^`]*`)+","[]":String.raw`(?:\\[[^\\]]*\\])(?:\\][^\\]]*\\])*`,'""-qq':String.raw`(?:"[^"]*")+`,'""-bs':String.raw`(?:"[^"\\\\]*(?:\\\\.[^"\\\\]*)*")`,'""-qq-bs':String.raw`(?:"[^"\\\\]*(?:\\\\.[^"\\\\]*)*")+`,'""-raw':String.raw`(?:"[^"]*")`,"''-qq":String.raw`(?:'[^']*')+`,"''-bs":String.raw`(?:'[^'\\\\]*(?:\\\\.[^'\\\\]*)*')`,"''-qq-bs":String.raw`(?:'[^'\\\\]*(?:\\\\.[^'\\\\]*)*')+`,"''-raw":String.raw`(?:'[^']*')`,$$:String.raw`(?<tag>\\$\\w*\\$)[\\s\\S]*?\\k<tag>`,"\'\'\'..\'\'\'":String.raw`\'\'\'[^\\\\]*?(?:\\\\.[^\\\\]*?)*?\'\'\'`,'""".."""':String.raw`"""[^\\\\]*?(?:\\\\.[^\\\\]*?)*?"""`,"{}":String.raw`(?:\\{[^\\}]*\\})`,"q''":cO()},WR=E=>typeof E=="string"?Pr[E]:"regex"in E?E.regex:LO(E)+Pr[E.quote],fO=E=>VE(E.map(e=>"regex"in e?e.regex:WR(e)).join("|")),wR=E=>E.map(WR).join("|"),Dr=E=>VE(wR(E)),PO=(E={})=>VE(xR(E)),xR=({first:E,rest:e,dashes:T,allowFirstCharNumber:t}={})=>{const r="\\\\p{Alphabetic}\\\\p{Mark}_",R="\\\\p{Decimal_Number}",A=LE(E??""),s=LE(e??""),o=t?`[${r}${R}${A}][${r}${R}${s}]*`:`[${r}${A}][${r}${R}${s}]*`;return T?_O(o):o};function $R(E,e){const T=E.slice(0,e).split(/\\n/);return{line:T.length,col:T[T.length-1].length+1}}var DO=class{constructor(E,e){this.rules=E,this.dialectName=e,this.input="",this.index=0}tokenize(E){this.input=E,this.index=0;const e=[];let T;for(;this.index<this.input.length;){const t=this.getWhitespace();if(this.index<this.input.length){if(T=this.getNextToken(),!T)throw this.createParseError();e.push(AE(eE({},T),{precedingWhitespace:t}))}}return e}createParseError(){const E=this.input.slice(this.index,this.index+10),{line:e,col:T}=$R(this.input,this.index);return new Error(`Parse error: Unexpected "${E}" at line ${e} column ${T}.
${this.dialectInfo()}`)}dialectInfo(){return this.dialectName==="sql"?`This likely happens because you're using the default "sql" dialect.
If possible, please select a more specific dialect (like sqlite, postgresql, etc).`:`SQL dialect used: "${this.dialectName}".`}getWhitespace(){ur.lastIndex=this.index;const E=ur.exec(this.input);if(E)return this.index+=E[0].length,E[0]}getNextToken(){for(const E of this.rules){const e=this.match(E);if(e)return e}}match(E){E.regex.lastIndex=this.index;const e=E.regex.exec(this.input);if(e){const T=e[0],t={type:E.type,raw:T,text:E.text?E.text(T):T,start:this.index};return E.key&&(t.key=E.key(T)),this.index+=T.length,t}}},dr=/\\/\\*/uy,dO=/([^/*]|\\*[^/]|\\/[^*])+/uy,pO=/\\*\\//uy,MO=class{constructor(){this.lastIndex=0}exec(E){let e="",T,t=0;if(T=this.matchSection(dr,E))e+=T,t++;else return null;for(;t>0;)if(T=this.matchSection(dr,E))e+=T,t++;else if(T=this.matchSection(pO,E))e+=T,t--;else if(T=this.matchSection(dO,E))e+=T;else return null;return[e]}matchSection(E,e){E.lastIndex=this.lastIndex;const T=E.exec(e);return T&&(this.lastIndex+=T[0].length),T?T[0]:null}},UO=class{constructor(E,e){this.cfg=E,this.dialectName=e,this.rulesBeforeParams=this.buildRulesBeforeParams(E),this.rulesAfterParams=this.buildRulesAfterParams(E)}tokenize(E,e){const T=[...this.rulesBeforeParams,...this.buildParamRules(this.cfg,e),...this.rulesAfterParams],t=new DO(T,this.dialectName).tokenize(E);return this.cfg.postProcess?this.cfg.postProcess(t):t}buildRulesBeforeParams(E){var e,T;return this.validRules([{type:"BLOCK_COMMENT",regex:/(\\/\\* *sql-formatter-disable *\\*\\/[\\s\\S]*?(?:\\/\\* *sql-formatter-enable *\\*\\/|$))/uy},{type:"BLOCK_COMMENT",regex:E.nestedBlockComments?new MO:/(\\/\\*[^]*?\\*\\/)/uy},{type:"LINE_COMMENT",regex:CO((e=E.lineCommentTypes)!=null?e:["--"])},{type:"QUOTED_IDENTIFIER",regex:Dr(E.identTypes)},{type:"NUMBER",regex:/(?:0x[0-9a-fA-F]+|0b[01]+|(?:-\\s*)?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+(?:\\.[0-9]+)?)?)(?![\\w\\p{Alphabetic}])/uy},{type:"RESERVED_PHRASE",regex:hE((T=E.reservedPhrases)!=null?T:[],E.identChars),text:Je},{type:"CASE",regex:/CASE\\b/iuy,text:Je},{type:"END",regex:/END\\b/iuy,text:Je},{type:"BETWEEN",regex:/BETWEEN\\b/iuy,text:Je},{type:"LIMIT",regex:E.reservedClauses.includes("LIMIT")?/LIMIT\\b/iuy:void 0,text:Je},{type:"RESERVED_CLAUSE",regex:hE(E.reservedClauses,E.identChars),text:Je},{type:"RESERVED_SELECT",regex:hE(E.reservedSelect,E.identChars),text:Je},{type:"RESERVED_SET_OPERATION",regex:hE(E.reservedSetOperations,E.identChars),text:Je},{type:"WHEN",regex:/WHEN\\b/iuy,text:Je},{type:"ELSE",regex:/ELSE\\b/iuy,text:Je},{type:"THEN",regex:/THEN\\b/iuy,text:Je},{type:"RESERVED_JOIN",regex:hE(E.reservedJoins,E.identChars),text:Je},{type:"AND",regex:/AND\\b/iuy,text:Je},{type:"OR",regex:/OR\\b/iuy,text:Je},{type:"XOR",regex:E.supportsXor?/XOR\\b/iuy:void 0,text:Je},{type:"RESERVED_FUNCTION_NAME",regex:hE(E.reservedFunctionNames,E.identChars),text:Je},{type:"RESERVED_DATA_TYPE",regex:hE(E.reservedDataTypes,E.identChars),text:Je},{type:"RESERVED_KEYWORD",regex:hE(E.reservedKeywords,E.identChars),text:Je}])}buildRulesAfterParams(E){var e,T;return this.validRules([{type:"VARIABLE",regex:E.variableTypes?fO(E.variableTypes):void 0},{type:"STRING",regex:Dr(E.stringTypes)},{type:"IDENTIFIER",regex:PO(E.identChars)},{type:"DELIMITER",regex:/[;]/uy},{type:"COMMA",regex:/[,]/y},{type:"OPEN_PAREN",regex:cr("open",E.extraParens)},{type:"CLOSE_PAREN",regex:cr("close",E.extraParens)},{type:"OPERATOR",regex:fr(["+","-","/",">","<","=","<>","<=",">=","!=",...(e=E.operators)!=null?e:[]])},{type:"ASTERISK",regex:/[*]/uy},{type:"PROPERTY_ACCESS_OPERATOR",regex:fr([".",...(T=E.propertyAccessOperators)!=null?T:[]])}])}buildParamRules(E,e){var T,t,r,R,A;const s={named:(e==null?void 0:e.named)||((T=E.paramTypes)==null?void 0:T.named)||[],quoted:(e==null?void 0:e.quoted)||((t=E.paramTypes)==null?void 0:t.quoted)||[],numbered:(e==null?void 0:e.numbered)||((r=E.paramTypes)==null?void 0:r.numbered)||[],positional:typeof(e==null?void 0:e.positional)=="boolean"?e.positional:(R=E.paramTypes)==null?void 0:R.positional,custom:(e==null?void 0:e.custom)||((A=E.paramTypes)==null?void 0:A.custom)||[]};return this.validRules([{type:"NAMED_PARAMETER",regex:AT(s.named,xR(E.paramChars||E.identChars)),key:o=>o.slice(1)},{type:"QUOTED_PARAMETER",regex:AT(s.quoted,wR(E.identTypes)),key:o=>(({tokenKey:n,quoteChar:S})=>n.replace(new RegExp(LE("\\\\"+S),"gu"),S))({tokenKey:o.slice(2,-1),quoteChar:o.slice(-1)})},{type:"NUMBERED_PARAMETER",regex:AT(s.numbered,"[0-9]+"),key:o=>o.slice(1)},{type:"POSITIONAL_PARAMETER",regex:s.positional?/[?]/y:void 0},...s.custom.map(o=>{var n;return{type:"CUSTOM_PARAMETER",regex:VE(o.regex),key:(n=o.key)!=null?n:S=>S}})])}validRules(E){return E.filter(e=>!!e.regex)}},Je=E=>ft(E.toUpperCase()),pr=new Map,mO=E=>{let e=pr.get(E);return e||(e=hO(E),pr.set(E,e)),e},hO=E=>({tokenizer:new UO(E.tokenizerOptions,E.name),formatOptions:GO(E.formatOptions)}),GO=E=>{var e;return{alwaysDenseOperators:E.alwaysDenseOperators||[],onelineClauses:Object.fromEntries(E.onelineClauses.map(T=>[T,!0])),tabularOnelineClauses:Object.fromEntries(((e=E.tabularOnelineClauses)!=null?e:E.onelineClauses).map(T=>[T,!0]))}};function gO(E){return E.indentStyle==="tabularLeft"||E.indentStyle==="tabularRight"?" ".repeat(10):E.useTabs?"	":" ".repeat(E.tabWidth)}function qE(E){return E.indentStyle==="tabularLeft"||E.indentStyle==="tabularRight"}var HO=class{constructor(E){this.params=E,this.index=0}get({key:E,text:e}){return this.params?E?this.params[E]:this.params[this.index++]:e}getPositionalParameterIndex(){return this.index}setPositionalParameterIndex(E){this.index=E}};function bO(E){return E.map(yO).map(BO).map(vO).map(FO).map(YO)}var yO=(E,e,T)=>{if(YR(E.type)){const t=VO(T,e);if(t&&t.type==="PROPERTY_ACCESS_OPERATOR")return AE(eE({},E),{type:"IDENTIFIER",text:E.raw})}return E},BO=(E,e,T)=>{if(E.type==="RESERVED_FUNCTION_NAME"){const t=it(T,e);if(!t||!XR(t))return AE(eE({},E),{type:"RESERVED_KEYWORD"})}return E},vO=(E,e,T)=>{if(E.type==="RESERVED_DATA_TYPE"){const t=it(T,e);if(t&&XR(t))return AE(eE({},E),{type:"RESERVED_PARAMETERIZED_DATA_TYPE"})}return E},FO=(E,e,T)=>{if(E.type==="IDENTIFIER"){const t=it(T,e);if(t&&kR(t))return AE(eE({},E),{type:"ARRAY_IDENTIFIER"})}return E},YO=(E,e,T)=>{if(E.type==="RESERVED_DATA_TYPE"){const t=it(T,e);if(t&&kR(t))return AE(eE({},E),{type:"ARRAY_KEYWORD"})}return E},VO=(E,e)=>it(E,e,-1),it=(E,e,T=1)=>{let t=1;for(;E[e+t*T]&&WO(E[e+t*T]);)t++;return E[e+t*T]},XR=E=>E.type==="OPEN_PAREN"&&E.text==="(",kR=E=>E.type==="OPEN_PAREN"&&E.text==="[",WO=E=>E.type==="BLOCK_COMMENT"||E.type==="LINE_COMMENT",KR=class{constructor(E){this.tokenize=E,this.index=0,this.tokens=[],this.input=""}reset(E,e){this.input=E,this.index=0,this.tokens=this.tokenize(E)}next(){return this.tokens[this.index++]}save(){}formatError(E){const{line:e,col:T}=$R(this.input,E.start);return`Parse error at token: ${E.text} at line ${e} column ${T}`}has(E){return E in vR}};function sT(E){return E[0]}var Te=new KR(E=>[]),yE=([[E]])=>E,qe=E=>({type:"keyword",tokenType:E.type,text:E.text,raw:E.raw}),Mr=E=>({type:"data_type",text:E.text,raw:E.raw}),Qe=(E,{leading:e,trailing:T})=>(e!=null&&e.length&&(E=AE(eE({},E),{leadingComments:e})),T!=null&&T.length&&(E=AE(eE({},E),{trailingComments:T})),E),wO=(E,{leading:e,trailing:T})=>{if(e!=null&&e.length){const[t,...r]=E;E=[Qe(t,{leading:e}),...r]}if(T!=null&&T.length){const t=E.slice(0,-1),r=E[E.length-1];E=[...t,Qe(r,{trailing:T})]}return E},xO={Lexer:Te,ParserRules:[{name:"main$ebnf$1",symbols:[]},{name:"main$ebnf$1",symbols:["main$ebnf$1","statement"],postprocess:E=>E[0].concat([E[1]])},{name:"main",symbols:["main$ebnf$1"],postprocess:([E])=>{const e=E[E.length-1];return e&&!e.hasSemicolon?e.children.length>0?E:E.slice(0,-1):E}},{name:"statement$subexpression$1",symbols:[Te.has("DELIMITER")?{type:"DELIMITER"}:DELIMITER]},{name:"statement$subexpression$1",symbols:[Te.has("EOF")?{type:"EOF"}:EOF]},{name:"statement",symbols:["expressions_or_clauses","statement$subexpression$1"],postprocess:([E,[e]])=>({type:"statement",children:E,hasSemicolon:e.type==="DELIMITER"})},{name:"expressions_or_clauses$ebnf$1",symbols:[]},{name:"expressions_or_clauses$ebnf$1",symbols:["expressions_or_clauses$ebnf$1","free_form_sql"],postprocess:E=>E[0].concat([E[1]])},{name:"expressions_or_clauses$ebnf$2",symbols:[]},{name:"expressions_or_clauses$ebnf$2",symbols:["expressions_or_clauses$ebnf$2","clause"],postprocess:E=>E[0].concat([E[1]])},{name:"expressions_or_clauses",symbols:["expressions_or_clauses$ebnf$1","expressions_or_clauses$ebnf$2"],postprocess:([E,e])=>[...E,...e]},{name:"clause$subexpression$1",symbols:["limit_clause"]},{name:"clause$subexpression$1",symbols:["select_clause"]},{name:"clause$subexpression$1",symbols:["other_clause"]},{name:"clause$subexpression$1",symbols:["set_operation"]},{name:"clause",symbols:["clause$subexpression$1"],postprocess:yE},{name:"limit_clause$ebnf$1$subexpression$1$ebnf$1",symbols:["free_form_sql"]},{name:"limit_clause$ebnf$1$subexpression$1$ebnf$1",symbols:["limit_clause$ebnf$1$subexpression$1$ebnf$1","free_form_sql"],postprocess:E=>E[0].concat([E[1]])},{name:"limit_clause$ebnf$1$subexpression$1",symbols:[Te.has("COMMA")?{type:"COMMA"}:COMMA,"limit_clause$ebnf$1$subexpression$1$ebnf$1"]},{name:"limit_clause$ebnf$1",symbols:["limit_clause$ebnf$1$subexpression$1"],postprocess:sT},{name:"limit_clause$ebnf$1",symbols:[],postprocess:()=>null},{name:"limit_clause",symbols:[Te.has("LIMIT")?{type:"LIMIT"}:LIMIT,"_","expression_chain_","limit_clause$ebnf$1"],postprocess:([E,e,T,t])=>{if(t){const[r,R]=t;return{type:"limit_clause",limitKw:Qe(qe(E),{trailing:e}),offset:T,count:R}}else return{type:"limit_clause",limitKw:Qe(qe(E),{trailing:e}),count:T}}},{name:"select_clause$subexpression$1$ebnf$1",symbols:[]},{name:"select_clause$subexpression$1$ebnf$1",symbols:["select_clause$subexpression$1$ebnf$1","free_form_sql"],postprocess:E=>E[0].concat([E[1]])},{name:"select_clause$subexpression$1",symbols:["all_columns_asterisk","select_clause$subexpression$1$ebnf$1"]},{name:"select_clause$subexpression$1$ebnf$2",symbols:[]},{name:"select_clause$subexpression$1$ebnf$2",symbols:["select_clause$subexpression$1$ebnf$2","free_form_sql"],postprocess:E=>E[0].concat([E[1]])},{name:"select_clause$subexpression$1",symbols:["asteriskless_free_form_sql","select_clause$subexpression$1$ebnf$2"]},{name:"select_clause",symbols:[Te.has("RESERVED_SELECT")?{type:"RESERVED_SELECT"}:RESERVED_SELECT,"select_clause$subexpression$1"],postprocess:([E,[e,T]])=>({type:"clause",nameKw:qe(E),children:[e,...T]})},{name:"select_clause",symbols:[Te.has("RESERVED_SELECT")?{type:"RESERVED_SELECT"}:RESERVED_SELECT],postprocess:([E])=>({type:"clause",nameKw:qe(E),children:[]})},{name:"all_columns_asterisk",symbols:[Te.has("ASTERISK")?{type:"ASTERISK"}:ASTERISK],postprocess:()=>({type:"all_columns_asterisk"})},{name:"other_clause$ebnf$1",symbols:[]},{name:"other_clause$ebnf$1",symbols:["other_clause$ebnf$1","free_form_sql"],postprocess:E=>E[0].concat([E[1]])},{name:"other_clause",symbols:[Te.has("RESERVED_CLAUSE")?{type:"RESERVED_CLAUSE"}:RESERVED_CLAUSE,"other_clause$ebnf$1"],postprocess:([E,e])=>({type:"clause",nameKw:qe(E),children:e})},{name:"set_operation$ebnf$1",symbols:[]},{name:"set_operation$ebnf$1",symbols:["set_operation$ebnf$1","free_form_sql"],postprocess:E=>E[0].concat([E[1]])},{name:"set_operation",symbols:[Te.has("RESERVED_SET_OPERATION")?{type:"RESERVED_SET_OPERATION"}:RESERVED_SET_OPERATION,"set_operation$ebnf$1"],postprocess:([E,e])=>({type:"set_operation",nameKw:qe(E),children:e})},{name:"expression_chain_$ebnf$1",symbols:["expression_with_comments_"]},{name:"expression_chain_$ebnf$1",symbols:["expression_chain_$ebnf$1","expression_with_comments_"],postprocess:E=>E[0].concat([E[1]])},{name:"expression_chain_",symbols:["expression_chain_$ebnf$1"],postprocess:sT},{name:"expression_chain$ebnf$1",symbols:[]},{name:"expression_chain$ebnf$1",symbols:["expression_chain$ebnf$1","_expression_with_comments"],postprocess:E=>E[0].concat([E[1]])},{name:"expression_chain",symbols:["expression","expression_chain$ebnf$1"],postprocess:([E,e])=>[E,...e]},{name:"andless_expression_chain$ebnf$1",symbols:[]},{name:"andless_expression_chain$ebnf$1",symbols:["andless_expression_chain$ebnf$1","_andless_expression_with_comments"],postprocess:E=>E[0].concat([E[1]])},{name:"andless_expression_chain",symbols:["andless_expression","andless_expression_chain$ebnf$1"],postprocess:([E,e])=>[E,...e]},{name:"expression_with_comments_",symbols:["expression","_"],postprocess:([E,e])=>Qe(E,{trailing:e})},{name:"_expression_with_comments",symbols:["_","expression"],postprocess:([E,e])=>Qe(e,{leading:E})},{name:"_andless_expression_with_comments",symbols:["_","andless_expression"],postprocess:([E,e])=>Qe(e,{leading:E})},{name:"free_form_sql$subexpression$1",symbols:["asteriskless_free_form_sql"]},{name:"free_form_sql$subexpression$1",symbols:["asterisk"]},{name:"free_form_sql",symbols:["free_form_sql$subexpression$1"],postprocess:yE},{name:"asteriskless_free_form_sql$subexpression$1",symbols:["asteriskless_andless_expression"]},{name:"asteriskless_free_form_sql$subexpression$1",symbols:["logic_operator"]},{name:"asteriskless_free_form_sql$subexpression$1",symbols:["comma"]},{name:"asteriskless_free_form_sql$subexpression$1",symbols:["comment"]},{name:"asteriskless_free_form_sql$subexpression$1",symbols:["other_keyword"]},{name:"asteriskless_free_form_sql",symbols:["asteriskless_free_form_sql$subexpression$1"],postprocess:yE},{name:"expression$subexpression$1",symbols:["andless_expression"]},{name:"expression$subexpression$1",symbols:["logic_operator"]},{name:"expression",symbols:["expression$subexpression$1"],postprocess:yE},{name:"andless_expression$subexpression$1",symbols:["asteriskless_andless_expression"]},{name:"andless_expression$subexpression$1",symbols:["asterisk"]},{name:"andless_expression",symbols:["andless_expression$subexpression$1"],postprocess:yE},{name:"asteriskless_andless_expression$subexpression$1",symbols:["atomic_expression"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["between_predicate"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["case_expression"]},{name:"asteriskless_andless_expression",symbols:["asteriskless_andless_expression$subexpression$1"],postprocess:yE},{name:"atomic_expression$subexpression$1",symbols:["array_subscript"]},{name:"atomic_expression$subexpression$1",symbols:["function_call"]},{name:"atomic_expression$subexpression$1",symbols:["property_access"]},{name:"atomic_expression$subexpression$1",symbols:["parenthesis"]},{name:"atomic_expression$subexpression$1",symbols:["curly_braces"]},{name:"atomic_expression$subexpression$1",symbols:["square_brackets"]},{name:"atomic_expression$subexpression$1",symbols:["operator"]},{name:"atomic_expression$subexpression$1",symbols:["identifier"]},{name:"atomic_expression$subexpression$1",symbols:["parameter"]},{name:"atomic_expression$subexpression$1",symbols:["literal"]},{name:"atomic_expression$subexpression$1",symbols:["data_type"]},{name:"atomic_expression$subexpression$1",symbols:["keyword"]},{name:"atomic_expression",symbols:["atomic_expression$subexpression$1"],postprocess:yE},{name:"array_subscript",symbols:[Te.has("ARRAY_IDENTIFIER")?{type:"ARRAY_IDENTIFIER"}:ARRAY_IDENTIFIER,"_","square_brackets"],postprocess:([E,e,T])=>({type:"array_subscript",array:Qe({type:"identifier",quoted:!1,text:E.text},{trailing:e}),parenthesis:T})},{name:"array_subscript",symbols:[Te.has("ARRAY_KEYWORD")?{type:"ARRAY_KEYWORD"}:ARRAY_KEYWORD,"_","square_brackets"],postprocess:([E,e,T])=>({type:"array_subscript",array:Qe(qe(E),{trailing:e}),parenthesis:T})},{name:"function_call",symbols:[Te.has("RESERVED_FUNCTION_NAME")?{type:"RESERVED_FUNCTION_NAME"}:RESERVED_FUNCTION_NAME,"_","parenthesis"],postprocess:([E,e,T])=>({type:"function_call",nameKw:Qe(qe(E),{trailing:e}),parenthesis:T})},{name:"parenthesis",symbols:[{literal:"("},"expressions_or_clauses",{literal:")"}],postprocess:([E,e,T])=>({type:"parenthesis",children:e,openParen:"(",closeParen:")"})},{name:"curly_braces$ebnf$1",symbols:[]},{name:"curly_braces$ebnf$1",symbols:["curly_braces$ebnf$1","free_form_sql"],postprocess:E=>E[0].concat([E[1]])},{name:"curly_braces",symbols:[{literal:"{"},"curly_braces$ebnf$1",{literal:"}"}],postprocess:([E,e,T])=>({type:"parenthesis",children:e,openParen:"{",closeParen:"}"})},{name:"square_brackets$ebnf$1",symbols:[]},{name:"square_brackets$ebnf$1",symbols:["square_brackets$ebnf$1","free_form_sql"],postprocess:E=>E[0].concat([E[1]])},{name:"square_brackets",symbols:[{literal:"["},"square_brackets$ebnf$1",{literal:"]"}],postprocess:([E,e,T])=>({type:"parenthesis",children:e,openParen:"[",closeParen:"]"})},{name:"property_access$subexpression$1",symbols:["identifier"]},{name:"property_access$subexpression$1",symbols:["array_subscript"]},{name:"property_access$subexpression$1",symbols:["all_columns_asterisk"]},{name:"property_access$subexpression$1",symbols:["parameter"]},{name:"property_access",symbols:["atomic_expression","_",Te.has("PROPERTY_ACCESS_OPERATOR")?{type:"PROPERTY_ACCESS_OPERATOR"}:PROPERTY_ACCESS_OPERATOR,"_","property_access$subexpression$1"],postprocess:([E,e,T,t,[r]])=>({type:"property_access",object:Qe(E,{trailing:e}),operator:T.text,property:Qe(r,{leading:t})})},{name:"between_predicate",symbols:[Te.has("BETWEEN")?{type:"BETWEEN"}:BETWEEN,"_","andless_expression_chain","_",Te.has("AND")?{type:"AND"}:AND,"_","andless_expression"],postprocess:([E,e,T,t,r,R,A])=>({type:"between_predicate",betweenKw:qe(E),expr1:wO(T,{leading:e,trailing:t}),andKw:qe(r),expr2:[Qe(A,{leading:R})]})},{name:"case_expression$ebnf$1",symbols:["expression_chain_"],postprocess:sT},{name:"case_expression$ebnf$1",symbols:[],postprocess:()=>null},{name:"case_expression$ebnf$2",symbols:[]},{name:"case_expression$ebnf$2",symbols:["case_expression$ebnf$2","case_clause"],postprocess:E=>E[0].concat([E[1]])},{name:"case_expression",symbols:[Te.has("CASE")?{type:"CASE"}:CASE,"_","case_expression$ebnf$1","case_expression$ebnf$2",Te.has("END")?{type:"END"}:END],postprocess:([E,e,T,t,r])=>({type:"case_expression",caseKw:Qe(qe(E),{trailing:e}),endKw:qe(r),expr:T||[],clauses:t})},{name:"case_clause",symbols:[Te.has("WHEN")?{type:"WHEN"}:WHEN,"_","expression_chain_",Te.has("THEN")?{type:"THEN"}:THEN,"_","expression_chain_"],postprocess:([E,e,T,t,r,R])=>({type:"case_when",whenKw:Qe(qe(E),{trailing:e}),thenKw:Qe(qe(t),{trailing:r}),condition:T,result:R})},{name:"case_clause",symbols:[Te.has("ELSE")?{type:"ELSE"}:ELSE,"_","expression_chain_"],postprocess:([E,e,T])=>({type:"case_else",elseKw:Qe(qe(E),{trailing:e}),result:T})},{name:"comma$subexpression$1",symbols:[Te.has("COMMA")?{type:"COMMA"}:COMMA]},{name:"comma",symbols:["comma$subexpression$1"],postprocess:([[E]])=>({type:"comma"})},{name:"asterisk$subexpression$1",symbols:[Te.has("ASTERISK")?{type:"ASTERISK"}:ASTERISK]},{name:"asterisk",symbols:["asterisk$subexpression$1"],postprocess:([[E]])=>({type:"operator",text:E.text})},{name:"operator$subexpression$1",symbols:[Te.has("OPERATOR")?{type:"OPERATOR"}:OPERATOR]},{name:"operator",symbols:["operator$subexpression$1"],postprocess:([[E]])=>({type:"operator",text:E.text})},{name:"identifier$subexpression$1",symbols:[Te.has("IDENTIFIER")?{type:"IDENTIFIER"}:IDENTIFIER]},{name:"identifier$subexpression$1",symbols:[Te.has("QUOTED_IDENTIFIER")?{type:"QUOTED_IDENTIFIER"}:QUOTED_IDENTIFIER]},{name:"identifier$subexpression$1",symbols:[Te.has("VARIABLE")?{type:"VARIABLE"}:VARIABLE]},{name:"identifier",symbols:["identifier$subexpression$1"],postprocess:([[E]])=>({type:"identifier",quoted:E.type!=="IDENTIFIER",text:E.text})},{name:"parameter$subexpression$1",symbols:[Te.has("NAMED_PARAMETER")?{type:"NAMED_PARAMETER"}:NAMED_PARAMETER]},{name:"parameter$subexpression$1",symbols:[Te.has("QUOTED_PARAMETER")?{type:"QUOTED_PARAMETER"}:QUOTED_PARAMETER]},{name:"parameter$subexpression$1",symbols:[Te.has("NUMBERED_PARAMETER")?{type:"NUMBERED_PARAMETER"}:NUMBERED_PARAMETER]},{name:"parameter$subexpression$1",symbols:[Te.has("POSITIONAL_PARAMETER")?{type:"POSITIONAL_PARAMETER"}:POSITIONAL_PARAMETER]},{name:"parameter$subexpression$1",symbols:[Te.has("CUSTOM_PARAMETER")?{type:"CUSTOM_PARAMETER"}:CUSTOM_PARAMETER]},{name:"parameter",symbols:["parameter$subexpression$1"],postprocess:([[E]])=>({type:"parameter",key:E.key,text:E.text})},{name:"literal$subexpression$1",symbols:[Te.has("NUMBER")?{type:"NUMBER"}:NUMBER]},{name:"literal$subexpression$1",symbols:[Te.has("STRING")?{type:"STRING"}:STRING]},{name:"literal",symbols:["literal$subexpression$1"],postprocess:([[E]])=>({type:"literal",text:E.text})},{name:"keyword$subexpression$1",symbols:[Te.has("RESERVED_KEYWORD")?{type:"RESERVED_KEYWORD"}:RESERVED_KEYWORD]},{name:"keyword$subexpression$1",symbols:[Te.has("RESERVED_PHRASE")?{type:"RESERVED_PHRASE"}:RESERVED_PHRASE]},{name:"keyword$subexpression$1",symbols:[Te.has("RESERVED_JOIN")?{type:"RESERVED_JOIN"}:RESERVED_JOIN]},{name:"keyword",symbols:["keyword$subexpression$1"],postprocess:([[E]])=>qe(E)},{name:"data_type$subexpression$1",symbols:[Te.has("RESERVED_DATA_TYPE")?{type:"RESERVED_DATA_TYPE"}:RESERVED_DATA_TYPE]},{name:"data_type",symbols:["data_type$subexpression$1"],postprocess:([[E]])=>Mr(E)},{name:"data_type",symbols:[Te.has("RESERVED_PARAMETERIZED_DATA_TYPE")?{type:"RESERVED_PARAMETERIZED_DATA_TYPE"}:RESERVED_PARAMETERIZED_DATA_TYPE,"_","parenthesis"],postprocess:([E,e,T])=>({type:"parameterized_data_type",dataType:Qe(Mr(E),{trailing:e}),parenthesis:T})},{name:"logic_operator$subexpression$1",symbols:[Te.has("AND")?{type:"AND"}:AND]},{name:"logic_operator$subexpression$1",symbols:[Te.has("OR")?{type:"OR"}:OR]},{name:"logic_operator$subexpression$1",symbols:[Te.has("XOR")?{type:"XOR"}:XOR]},{name:"logic_operator",symbols:["logic_operator$subexpression$1"],postprocess:([[E]])=>qe(E)},{name:"other_keyword$subexpression$1",symbols:[Te.has("WHEN")?{type:"WHEN"}:WHEN]},{name:"other_keyword$subexpression$1",symbols:[Te.has("THEN")?{type:"THEN"}:THEN]},{name:"other_keyword$subexpression$1",symbols:[Te.has("ELSE")?{type:"ELSE"}:ELSE]},{name:"other_keyword$subexpression$1",symbols:[Te.has("END")?{type:"END"}:END]},{name:"other_keyword",symbols:["other_keyword$subexpression$1"],postprocess:([[E]])=>qe(E)},{name:"_$ebnf$1",symbols:[]},{name:"_$ebnf$1",symbols:["_$ebnf$1","comment"],postprocess:E=>E[0].concat([E[1]])},{name:"_",symbols:["_$ebnf$1"],postprocess:([E])=>E},{name:"comment",symbols:[Te.has("LINE_COMMENT")?{type:"LINE_COMMENT"}:LINE_COMMENT],postprocess:([E])=>({type:"line_comment",text:E.text,precedingWhitespace:E.precedingWhitespace})},{name:"comment",symbols:[Te.has("BLOCK_COMMENT")?{type:"BLOCK_COMMENT"}:BLOCK_COMMENT],postprocess:([E])=>({type:"block_comment",text:E.text,precedingWhitespace:E.precedingWhitespace})},{name:"comment",symbols:[Te.has("DISABLE_COMMENT")?{type:"DISABLE_COMMENT"}:DISABLE_COMMENT],postprocess:([E])=>({type:"disable_comment",text:E.text,precedingWhitespace:E.precedingWhitespace})}],ParserStart:"main"},$O=xO,{Parser:XO,Grammar:kO}=qA;function KO(E){let e={};const T=new KR(r=>[...bO(E.tokenize(r,e)),FR(r.length)]),t=new XO(kO.fromCompiled($O),{lexer:T});return{parse:(r,R)=>{e=R;const{results:A}=t.feed(r);if(A.length===1)return A[0];throw A.length===0?new Error("Parse error: Invalid SQL"):new Error(`Parse error: Ambiguous grammar
${JSON.stringify(A,void 0,2)}`)}}}var JR=class{constructor(E){this.indentation=E,this.items=[]}add(...E){for(const e of E)switch(e){case 0:this.items.push(0);break;case 1:this.trimHorizontalWhitespace();break;case 2:this.trimWhitespace();break;case 3:this.trimHorizontalWhitespace(),this.addNewline(3);break;case 4:this.trimHorizontalWhitespace(),this.addNewline(4);break;case 5:this.addIndentation();break;case 6:this.items.push(6);break;default:this.items.push(e)}}trimHorizontalWhitespace(){for(;JO(St(this.items));)this.items.pop()}trimWhitespace(){for(;qO(St(this.items));)this.items.pop()}addNewline(E){if(this.items.length>0)switch(St(this.items)){case 3:this.items.pop(),this.items.push(E);break;case 4:break;default:this.items.push(E);break}}addIndentation(){for(let E=0;E<this.indentation.getLevel();E++)this.items.push(6)}toString(){return this.items.map(E=>this.itemToString(E)).join("")}getLayoutItems(){return this.items}itemToString(E){switch(E){case 0:return" ";case 3:case 4:return`
`;case 6:return this.indentation.getSingleIndent();default:return E}}},JO=E=>E===0||E===6,qO=E=>E===0||E===6||E===3;function Ur(E,e){if(e==="standard")return E;let T=[];return E.length>=10&&E.includes(" ")&&([E,...T]=E.split(" ")),e==="tabularLeft"?E=E.padEnd(9," "):E=E.padStart(9," "),E+["",...T].join(" ")}function mr(E){return ss(E)||E==="RESERVED_CLAUSE"||E==="RESERVED_SELECT"||E==="RESERVED_SET_OPERATION"||E==="RESERVED_JOIN"||E==="LIMIT"}var ST="top-level",QO="block-level",qR=class{constructor(E){this.indent=E,this.indentTypes=[]}getSingleIndent(){return this.indent}getLevel(){return this.indentTypes.length}increaseTopLevel(){this.indentTypes.push(ST)}increaseBlockLevel(){this.indentTypes.push(QO)}decreaseTopLevel(){this.indentTypes.length>0&&St(this.indentTypes)===ST&&this.indentTypes.pop()}decreaseBlockLevel(){for(;this.indentTypes.length>0&&this.indentTypes.pop()===ST;);}},ZO=class extends JR{constructor(E){super(new qR("")),this.expressionWidth=E,this.length=0,this.trailingSpace=!1}add(...E){if(E.forEach(e=>this.addToLength(e)),this.length>this.expressionWidth)throw new aT;super.add(...E)}addToLength(E){if(typeof E=="string")this.length+=E.length,this.trailingSpace=!1;else{if(E===4||E===3)throw new aT;E===5||E===6||E===0?this.trailingSpace||(this.length++,this.trailingSpace=!0):(E===2||E===1)&&this.trailingSpace&&(this.trailingSpace=!1,this.length--)}}},aT=class extends Error{},jO=class IT{constructor({cfg:e,dialectCfg:T,params:t,layout:r,inline:R=!1}){this.inline=!1,this.nodes=[],this.index=-1,this.cfg=e,this.dialectCfg=T,this.inline=R,this.params=t,this.layout=r}format(e){for(this.nodes=e,this.index=0;this.index<this.nodes.length;this.index++)this.formatNode(this.nodes[this.index]);return this.layout}formatNode(e){this.formatComments(e.leadingComments),this.formatNodeWithoutComments(e),this.formatComments(e.trailingComments)}formatNodeWithoutComments(e){switch(e.type){case"function_call":return this.formatFunctionCall(e);case"parameterized_data_type":return this.formatParameterizedDataType(e);case"array_subscript":return this.formatArraySubscript(e);case"property_access":return this.formatPropertyAccess(e);case"parenthesis":return this.formatParenthesis(e);case"between_predicate":return this.formatBetweenPredicate(e);case"case_expression":return this.formatCaseExpression(e);case"case_when":return this.formatCaseWhen(e);case"case_else":return this.formatCaseElse(e);case"clause":return this.formatClause(e);case"set_operation":return this.formatSetOperation(e);case"limit_clause":return this.formatLimitClause(e);case"all_columns_asterisk":return this.formatAllColumnsAsterisk(e);case"literal":return this.formatLiteral(e);case"identifier":return this.formatIdentifier(e);case"parameter":return this.formatParameter(e);case"operator":return this.formatOperator(e);case"comma":return this.formatComma(e);case"line_comment":return this.formatLineComment(e);case"block_comment":return this.formatBlockComment(e);case"disable_comment":return this.formatBlockComment(e);case"data_type":return this.formatDataType(e);case"keyword":return this.formatKeywordNode(e)}}formatFunctionCall(e){this.withComments(e.nameKw,()=>{this.layout.add(this.showFunctionKw(e.nameKw))}),this.formatNode(e.parenthesis)}formatParameterizedDataType(e){this.withComments(e.dataType,()=>{this.layout.add(this.showDataType(e.dataType))}),this.formatNode(e.parenthesis)}formatArraySubscript(e){let T;switch(e.array.type){case"data_type":T=this.showDataType(e.array);break;case"keyword":T=this.showKw(e.array);break;default:T=this.showIdentifier(e.array);break}this.withComments(e.array,()=>{this.layout.add(T)}),this.formatNode(e.parenthesis)}formatPropertyAccess(e){this.formatNode(e.object),this.layout.add(1,e.operator),this.formatNode(e.property)}formatParenthesis(e){const T=this.formatInlineExpression(e.children);T?(this.layout.add(e.openParen),this.layout.add(...T.getLayoutItems()),this.layout.add(1,e.closeParen,0)):(this.layout.add(e.openParen,3),qE(this.cfg)?(this.layout.add(5),this.layout=this.formatSubExpression(e.children)):(this.layout.indentation.increaseBlockLevel(),this.layout.add(5),this.layout=this.formatSubExpression(e.children),this.layout.indentation.decreaseBlockLevel()),this.layout.add(3,5,e.closeParen,0))}formatBetweenPredicate(e){this.layout.add(this.showKw(e.betweenKw),0),this.layout=this.formatSubExpression(e.expr1),this.layout.add(1,0,this.showNonTabularKw(e.andKw),0),this.layout=this.formatSubExpression(e.expr2),this.layout.add(0)}formatCaseExpression(e){this.formatNode(e.caseKw),this.layout.indentation.increaseBlockLevel(),this.layout=this.formatSubExpression(e.expr),this.layout=this.formatSubExpression(e.clauses),this.layout.indentation.decreaseBlockLevel(),this.layout.add(3,5),this.formatNode(e.endKw)}formatCaseWhen(e){this.layout.add(3,5),this.formatNode(e.whenKw),this.layout=this.formatSubExpression(e.condition),this.formatNode(e.thenKw),this.layout=this.formatSubExpression(e.result)}formatCaseElse(e){this.layout.add(3,5),this.formatNode(e.elseKw),this.layout=this.formatSubExpression(e.result)}formatClause(e){this.isOnelineClause(e)?this.formatClauseInOnelineStyle(e):qE(this.cfg)?this.formatClauseInTabularStyle(e):this.formatClauseInIndentedStyle(e)}isOnelineClause(e){return qE(this.cfg)?this.dialectCfg.tabularOnelineClauses[e.nameKw.text]:this.dialectCfg.onelineClauses[e.nameKw.text]}formatClauseInIndentedStyle(e){this.layout.add(3,5,this.showKw(e.nameKw),3),this.layout.indentation.increaseTopLevel(),this.layout.add(5),this.layout=this.formatSubExpression(e.children),this.layout.indentation.decreaseTopLevel()}formatClauseInOnelineStyle(e){this.layout.add(3,5,this.showKw(e.nameKw),0),this.layout=this.formatSubExpression(e.children)}formatClauseInTabularStyle(e){this.layout.add(3,5,this.showKw(e.nameKw),0),this.layout.indentation.increaseTopLevel(),this.layout=this.formatSubExpression(e.children),this.layout.indentation.decreaseTopLevel()}formatSetOperation(e){this.layout.add(3,5,this.showKw(e.nameKw),3),this.layout.add(5),this.layout=this.formatSubExpression(e.children)}formatLimitClause(e){this.withComments(e.limitKw,()=>{this.layout.add(3,5,this.showKw(e.limitKw))}),this.layout.indentation.increaseTopLevel(),qE(this.cfg)?this.layout.add(0):this.layout.add(3,5),e.offset?(this.layout=this.formatSubExpression(e.offset),this.layout.add(1,",",0),this.layout=this.formatSubExpression(e.count)):this.layout=this.formatSubExpression(e.count),this.layout.indentation.decreaseTopLevel()}formatAllColumnsAsterisk(e){this.layout.add("*",0)}formatLiteral(e){this.layout.add(e.text,0)}formatIdentifier(e){this.layout.add(this.showIdentifier(e),0)}formatParameter(e){this.layout.add(this.params.get(e),0)}formatOperator({text:e}){this.cfg.denseOperators||this.dialectCfg.alwaysDenseOperators.includes(e)?this.layout.add(1,e):e===":"?this.layout.add(1,e,0):this.layout.add(e,0)}formatComma(e){this.inline?this.layout.add(1,",",0):this.layout.add(1,",",3,5)}withComments(e,T){this.formatComments(e.leadingComments),T(),this.formatComments(e.trailingComments)}formatComments(e){e&&e.forEach(T=>{T.type==="line_comment"?this.formatLineComment(T):this.formatBlockComment(T)})}formatLineComment(e){nT(e.precedingWhitespace||"")?this.layout.add(3,5,e.text,4,5):this.layout.getLayoutItems().length>0?this.layout.add(2,0,e.text,4,5):this.layout.add(e.text,4,5)}formatBlockComment(e){e.type==="block_comment"&&this.isMultilineBlockComment(e)?(this.splitBlockComment(e.text).forEach(T=>{this.layout.add(3,5,T)}),this.layout.add(3,5)):this.layout.add(e.text,0)}isMultilineBlockComment(e){return nT(e.text)||nT(e.precedingWhitespace||"")}isDocComment(e){const T=e.split(/\\n/);return/^\\/\\*\\*?$/.test(T[0])&&T.slice(1,T.length-1).every(t=>/^\\s*\\*/.test(t))&&/^\\s*\\*\\/$/.test(St(T))}splitBlockComment(e){return this.isDocComment(e)?e.split(/\\n/).map(T=>/^\\s*\\*/.test(T)?" "+T.replace(/^\\s*/,""):T):e.split(/\\n/).map(T=>T.replace(/^\\s*/,""))}formatSubExpression(e){return new IT({cfg:this.cfg,dialectCfg:this.dialectCfg,params:this.params,layout:this.layout,inline:this.inline}).format(e)}formatInlineExpression(e){const T=this.params.getPositionalParameterIndex();try{return new IT({cfg:this.cfg,dialectCfg:this.dialectCfg,params:this.params,layout:new ZO(this.cfg.expressionWidth),inline:!0}).format(e)}catch(t){if(t instanceof aT){this.params.setPositionalParameterIndex(T);return}else throw t}}formatKeywordNode(e){switch(e.tokenType){case"RESERVED_JOIN":return this.formatJoin(e);case"AND":case"OR":case"XOR":return this.formatLogicalOperator(e);default:return this.formatKeyword(e)}}formatJoin(e){qE(this.cfg)?(this.layout.indentation.decreaseTopLevel(),this.layout.add(3,5,this.showKw(e),0),this.layout.indentation.increaseTopLevel()):this.layout.add(3,5,this.showKw(e),0)}formatKeyword(e){this.layout.add(this.showKw(e),0)}formatLogicalOperator(e){this.cfg.logicalOperatorNewline==="before"?qE(this.cfg)?(this.layout.indentation.decreaseTopLevel(),this.layout.add(3,5,this.showKw(e),0),this.layout.indentation.increaseTopLevel()):this.layout.add(3,5,this.showKw(e),0):this.layout.add(this.showKw(e),3,5)}formatDataType(e){this.layout.add(this.showDataType(e),0)}showKw(e){return mr(e.tokenType)?Ur(this.showNonTabularKw(e),this.cfg.indentStyle):this.showNonTabularKw(e)}showNonTabularKw(e){switch(this.cfg.keywordCase){case"preserve":return ft(e.raw);case"upper":return e.text;case"lower":return e.text.toLowerCase()}}showFunctionKw(e){return mr(e.tokenType)?Ur(this.showNonTabularFunctionKw(e),this.cfg.indentStyle):this.showNonTabularFunctionKw(e)}showNonTabularFunctionKw(e){switch(this.cfg.functionCase){case"preserve":return ft(e.raw);case"upper":return e.text;case"lower":return e.text.toLowerCase()}}showIdentifier(e){if(e.quoted)return e.text;switch(this.cfg.identifierCase){case"preserve":return e.text;case"upper":return e.text.toUpperCase();case"lower":return e.text.toLowerCase()}}showDataType(e){switch(this.cfg.dataTypeCase){case"preserve":return ft(e.raw);case"upper":return e.text;case"lower":return e.text.toLowerCase()}}},zO=class{constructor(E,e){this.dialect=E,this.cfg=e,this.params=new HO(this.cfg.params)}format(E){const e=this.parse(E);return this.formatAst(e).trimEnd()}parse(E){return KO(this.dialect.tokenizer).parse(E,this.cfg.paramTypes||{})}formatAst(E){return E.map(e=>this.formatStatement(e)).join(`
`.repeat(this.cfg.linesBetweenQueries+1))}formatStatement(E){const e=new jO({cfg:this.cfg,dialectCfg:this.dialect.formatOptions,params:this.params,layout:new JR(new qR(gO(this.cfg)))}).format(E.children);return E.hasSemicolon&&(this.cfg.newlineBeforeSemicolon?e.add(3,";"):e.add(2,";")),e.toString()}},NT=class extends Error{};function ei(E){const e=["multilineLists","newlineBeforeOpenParen","newlineBeforeCloseParen","aliasAs","commaPosition","tabulateAlias"];for(const T of e)if(T in E)throw new NT(`${T} config is no more supported.`);if(E.expressionWidth<=0)throw new NT(`expressionWidth config must be positive number. Received ${E.expressionWidth} instead.`);return E.params&&!Ei(E.params)&&console.warn('WARNING: All "params" option values should be strings.'),E}function Ei(E){return(E instanceof Array?E:Object.values(E)).every(T=>typeof T=="string")}var QR={bigquery:"bigquery",db2:"db2",db2i:"db2i",hive:"hive",mariadb:"mariadb",mysql:"mysql",n1ql:"n1ql",plsql:"plsql",postgresql:"postgresql",redshift:"redshift",spark:"spark",sqlite:"sqlite",sql:"sql",tidb:"tidb",trino:"trino",transactsql:"transactsql",tsql:"transactsql",singlestoredb:"singlestoredb",snowflake:"snowflake"},ti=Object.keys(QR),Ti={tabWidth:2,useTabs:!1,keywordCase:"preserve",identifierCase:"preserve",dataTypeCase:"preserve",functionCase:"preserve",indentStyle:"standard",logicalOperatorNewline:"before",expressionWidth:50,linesBetweenQueries:1,denseOperators:!1,newlineBeforeSemicolon:!1},hr=(E,e={})=>{if(typeof e.language=="string"&&!ti.includes(e.language))throw new NT(`Unsupported SQL dialect: ${e.language}`);const T=QR[e.language||"sql"];return ri(E,AE(eE({},e),{dialect:BR[T]}))},ri=(E,e)=>{var T=e,{dialect:t}=T,r=jA(T,["dialect"]);if(typeof E!="string")throw new Error("Invalid query argument. Expected string, instead got "+typeof E);const R=ei(eE(eE({},Ti),r));return new zO(mO(t),R).format(E)};function Gr(E,e,T){const t=E.slice();return t[1]=e[T],t}function gr(E,e){let T,t=e[1].name+"",r,R,A,s=e[1].instantiated_value+"",o,n;return{key:E,first:null,c(){T=P("b"),r=Re(t),R=Re(":"),A=x(),o=Re(s),n=P("br"),this.first=T},m(S,O){W(S,T,O),l(T,r),l(T,R),W(S,A,O),W(S,o,O),W(S,n,O)},p(S,O){e=S,O&1&&t!==(t=e[1].name+"")&&Pe(r,t),O&1&&s!==(s=e[1].instantiated_value+"")&&Pe(o,s)},d(S){S&&(Y(T),Y(A),Y(o),Y(n))}}}function Ri(E){let e,T,t,r,R,A,s,o=E[0].function_name+"",n,S,O,N=[],u=new Map,D,d,C,_,L,c,H,y=E[0].description+"",h,a,I,f,m=hr(E[0].instantiated_sql)+"",U,g,F,w,K=E[0].sql_template+"",j,pe=ce(E[0].arguments);const se=le=>le[1].name;for(let le=0;le<pe.length;le+=1){let Ue=Gr(E,pe,le),ye=se(Ue);u.set(ye,N[le]=gr(ye,Ue))}return{c(){e=P("div"),T=P("div"),t=P("div"),t.innerHTML='<span class="inline-flex justify-center items-center size-8 rounded-full border-4 border-teal-100 bg-teal-200 text-teal-800 dark:border-teal-900 dark:bg-teal-800 dark:text-teal-400"><svg class="flex-shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z"></path><path d="m9 12 2 2 4-4"></path></svg></span>',r=x(),R=P("div"),A=P("h3"),s=Re("Function: "),n=Re(o),S=x(),O=P("p");for(let le=0;le<N.length;le+=1)N[le].c();D=x(),d=P("div"),C=P("div"),C.innerHTML='<nav class="flex space-x-2" aria-label="Tabs"><button type="button" class="hs-tab-active:font-semibold hs-tab-active:border-blue-600 hs-tab-active:text-blue-600 py-4 px-1 inline-flex items-center gap-x-2 border-b-2 border-transparent text-sm whitespace-nowrap text-gray-500 hover:text-blue-600 disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-400 dark:hover:text-blue-500 active" id="basic-tabs-item-1" data-hs-tab="#basic-tabs-1" aria-controls="basic-tabs-1" role="tab">Description</button> <button type="button" class="hs-tab-active:font-semibold hs-tab-active:border-blue-600 hs-tab-active:text-blue-600 py-4 px-1 inline-flex items-center gap-x-2 border-b-2 border-transparent text-sm whitespace-nowrap text-gray-500 hover:text-blue-600 disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-400 dark:hover:text-blue-500" id="basic-tabs-item-2" data-hs-tab="#basic-tabs-2" aria-controls="basic-tabs-2" role="tab">SQL</button> <button type="button" class="hs-tab-active:font-semibold hs-tab-active:border-blue-600 hs-tab-active:text-blue-600 py-4 px-1 inline-flex items-center gap-x-2 border-b-2 border-transparent text-sm whitespace-nowrap text-gray-500 hover:text-blue-600 disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-400 dark:hover:text-blue-500" id="basic-tabs-item-3" data-hs-tab="#basic-tabs-3" aria-controls="basic-tabs-3" role="tab">Template</button></nav>',_=x(),L=P("div"),c=P("div"),H=P("p"),h=Re(y),a=x(),I=P("div"),f=P("p"),U=Re(m),g=x(),F=P("div"),w=P("p"),j=Re(K),i(t,"class","flex-shrink-0"),i(A,"class","text-gray-800 font-semibold dark:text-white"),i(O,"class","text-sm text-gray-700 dark:text-neutral-400"),i(R,"class","ms-3"),i(T,"class","flex"),i(C,"class","border-b border-gray-200 px-4 dark:border-neutral-700"),i(H,"class","text-gray-500 dark:text-neutral-400"),i(c,"id","basic-tabs-1"),i(c,"role","tabpanel"),i(c,"aria-labelledby","basic-tabs-item-1"),i(f,"class","text-gray-500 dark:text-neutral-400 font-mono text-teal-800"),i(I,"id","basic-tabs-2"),i(I,"class","hidden"),i(I,"role","tabpanel"),i(I,"aria-labelledby","basic-tabs-item-2"),i(w,"class","text-gray-500 dark:text-neutral-400 font-mono"),i(F,"id","basic-tabs-3"),i(F,"class","hidden"),i(F,"role","tabpanel"),i(F,"aria-labelledby","basic-tabs-item-3"),i(L,"class","px-4"),i(d,"class","w-full bg-white rounded-lg shadow-md dark:bg-neutral-800"),i(e,"class","bg-teal-50 border-t-2 border-teal-500 rounded-lg p-4 dark:bg-teal-800/30"),i(e,"role","alert")},m(le,Ue){W(le,e,Ue),l(e,T),l(T,t),l(T,r),l(T,R),l(R,A),l(A,s),l(A,n),l(R,S),l(R,O);for(let ye=0;ye<N.length;ye+=1)N[ye]&&N[ye].m(O,null);l(e,D),l(e,d),l(d,C),l(d,_),l(d,L),l(L,c),l(c,H),l(H,h),l(L,a),l(L,I),l(I,f),l(f,U),l(L,g),l(L,F),l(F,w),l(w,j)},p(le,[Ue]){Ue&1&&o!==(o=le[0].function_name+"")&&Pe(n,o),Ue&1&&(pe=ce(le[0].arguments),N=_n(N,Ue,se,1,le,pe,u,O,ln,gr,null,Gr)),Ue&1&&y!==(y=le[0].description+"")&&Pe(h,y),Ue&1&&m!==(m=hr(le[0].instantiated_sql)+"")&&Pe(U,m),Ue&1&&K!==(K=le[0].sql_template+"")&&Pe(j,K)},i:Z,o:Z,d(le){le&&Y(e);for(let Ue=0;Ue<N.length;Ue+=1)N[Ue].d()}}}function ni(E,e,T){let{functionData:t}=e;return E.$$set=r=>{"functionData"in r&&T(0,t=r.functionData)},[t]}class Ai extends Le{constructor(e){super(),_e(this,e,ni,Ri,Ne,{functionData:0})}}function Hr(E,e,T){const t=E.slice();return t[12]=e[T],t}function br(E,e,T){const t=E.slice();return t[12]=e[T],t[13]=e,t[14]=T,t}function si(E){let e,T,t,r=E[0].function_name+"",R,A,s,o=E[0].description+"",n,S,O,N,u,D,d,C,_,L=ce(E[0].arguments),c=[];for(let H=0;H<L.length;H+=1)c[H]=yr(Hr(E,L,H));return{c(){e=P("div"),T=P("div"),t=P("h3"),R=Re(r),A=x(),s=P("p"),n=Re(o),S=x(),O=P("ul");for(let H=0;H<c.length;H+=1)c[H].c();N=x(),u=P("button"),u.textContent="Delete",D=x(),d=P("button"),d.textContent="Edit",i(t,"class","text-lg font-bold text-gray-800 dark:text-white"),i(s,"class","mt-1 text-xs font-medium uppercase text-gray-500 dark:text-neutral-500"),i(O,"class","mt-1 marker:text-blue-600 list-disc ps-5 space-y-2 text-sm text-gray-600 dark:text-neutral-400"),i(T,"class","flex-grow"),i(u,"class","mt-3 inline-flex items-center gap-x-1 text-sm font-semibold rounded-lg border border-red-600 text-red-600 hover:border-red-500 hover:text-red-500 disabled:opacity-50 disabled:pointer-events-none dark:border-red-500 dark:text-red-500 dark:hover:text-red-400 dark:hover:border-red-400 py-1 px-4 max-w-fit"),i(d,"class","mt-3 inline-flex items-center gap-x-1 text-sm font-semibold rounded-lg border border-blue-600 text-blue-600 hover:border-blue-500 hover:text-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:border-blue-500 dark:text-blue-500 dark:hover:text-blue-400 dark:hover:border-blue-400 py-1 px-4 max-w-fit"),i(e,"class","p-4 flex flex-col bg-white border border-t-4 border-t-blue-600 shadow-sm rounded-xl dark:bg-neutral-900 dark:border-neutral-7000 dark:border-t-blue-500 dark:shadow-neutral-700/70")},m(H,y){W(H,e,y),l(e,T),l(T,t),l(t,R),l(T,A),l(T,s),l(s,n),l(T,S),l(T,O);for(let h=0;h<c.length;h+=1)c[h]&&c[h].m(O,null);l(e,N),l(e,u),l(e,D),l(e,d),C||(_=[ae(u,"click",E[10]),ae(d,"click",E[11])],C=!0)},p(H,y){if(y&1&&r!==(r=H[0].function_name+"")&&Pe(R,r),y&1&&o!==(o=H[0].description+"")&&Pe(n,o),y&1){L=ce(H[0].arguments);let h;for(h=0;h<L.length;h+=1){const a=Hr(H,L,h);c[h]?c[h].p(a,y):(c[h]=yr(a),c[h].c(),c[h].m(O,null))}for(;h<c.length;h+=1)c[h].d(1);c.length=L.length}},d(H){H&&Y(e),nE(c,H),C=!1,iE(_)}}}function Si(E){let e,T,t,r,R,A,s,o,n,S,O,N,u,D,d,C,_,L,c,H,y,h,a,I,f,m=ce(E[1].arguments),U=[];for(let g=0;g<m.length;g+=1)U[g]=Br(br(E,m,g));return{c(){e=P("div"),T=P("form"),t=P("div"),r=P("div"),R=P("span"),R.textContent="Function Name",A=x(),s=P("input"),o=x(),n=P("div"),S=P("span"),S.textContent="Function Description",O=x(),N=P("textarea"),u=x(),D=P("div"),d=P("span"),d.textContent="SQL Template",C=x(),_=P("textarea"),L=x();for(let g=0;g<U.length;g+=1)U[g].c();c=x(),H=P("div"),y=P("button"),y.textContent="Cancel",h=x(),a=P("button"),a.textContent="Save",i(R,"class","inline-block text-sm font-bold text-gray-800 mt-2.5 dark:text-neutral-200"),i(s,"type","text"),i(s,"class","py-2 px-3 pe-11 block w-full border-gray-200 shadow-sm rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600"),i(s,"placeholder","Enter function name"),i(r,"class","space-y-2"),i(t,"class","space-y-4 sm:space-y-6"),i(S,"class","inline-block text-sm font-bold text-gray-800 mt-2.5 dark:text-neutral-200"),i(N,"class","py-2 px-3 pe-11 block w-full border-gray-200 shadow-sm rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600"),i(N,"placeholder","Enter function description"),i(n,"class","space-y-2"),i(d,"class","inline-block text-sm font-bold text-gray-800 mt-2.5 dark:text-neutral-200"),i(_,"class","py-2 px-3 pe-11 block w-full border-gray-200 shadow-sm rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600 font-mono"),i(_,"placeholder","Enter function description"),i(D,"class","space-y-2"),i(y,"class","py-2 px-3 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-red-500 text-red-500 hover:border-red-400 hover:text-red-400 disabled:opacity-50 disabled:pointer-events-none"),i(a,"class","py-2 px-3 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none"),i(H,"class","mt-3 flex gap-x-2"),i(e,"class","p-4 flex flex-col bg-white border border-t-4 border-t-red-600 shadow-sm rounded-xl dark:bg-neutral-900 dark:border-neutral-7000 dark:border-t-red-500 dark:shadow-neutral-700/70")},m(g,F){W(g,e,F),l(e,T),l(T,t),l(t,r),l(r,R),l(r,A),l(r,s),Ye(s,E[1].function_name),l(T,o),l(T,n),l(n,S),l(n,O),l(n,N),Ye(N,E[1].description),l(T,u),l(T,D),l(D,d),l(D,C),l(D,_),Ye(_,E[1].sql_template),l(T,L);for(let w=0;w<U.length;w+=1)U[w]&&U[w].m(T,null);l(e,c),l(e,H),l(H,y),l(H,h),l(H,a),I||(f=[ae(s,"input",E[2]),ae(N,"input",E[3]),ae(_,"input",E[4]),ae(y,"click",E[8]),ae(a,"click",E[9])],I=!0)},p(g,F){if(F&2&&s.value!==g[1].function_name&&Ye(s,g[1].function_name),F&2&&Ye(N,g[1].description),F&2&&Ye(_,g[1].sql_template),F&2){m=ce(g[1].arguments);let w;for(w=0;w<m.length;w+=1){const K=br(g,m,w);U[w]?U[w].p(K,F):(U[w]=Br(K),U[w].c(),U[w].m(T,null))}for(;w<U.length;w+=1)U[w].d(1);U.length=m.length}},d(g){g&&Y(e),nE(U,g),I=!1,iE(f)}}}function yr(E){let e,T,t=E[12].name+"",r,R,A,s=E[12].description+"",o;return{c(){e=P("li"),T=P("b"),r=Re(t),R=Re(":"),A=x(),o=Re(s)},m(n,S){W(n,e,S),l(e,T),l(T,r),l(T,R),l(e,A),l(e,o)},p(n,S){S&1&&t!==(t=n[12].name+"")&&Pe(r,t),S&1&&s!==(s=n[12].description+"")&&Pe(o,s)},d(n){n&&Y(e)}}}function Br(E){let e,T,t,r,R,A,s,o,n,S,O,N,u,D,d,C,_,L,c,H,y;function h(){E[5].call(R,E[13],E[14])}function a(){E[6].call(S,E[13],E[14])}function I(){E[7].call(d,E[13],E[14])}return{c(){e=P("div"),T=P("div"),t=P("span"),t.textContent="Argument Name",r=x(),R=P("input"),A=x(),s=P("div"),o=P("span"),o.textContent="Argument Description",n=x(),S=P("input"),O=x(),N=P("div"),u=P("span"),u.textContent="Argument Type",D=x(),d=P("select"),C=P("option"),C.textContent="String",_=P("option"),_.textContent="Numeric",L=P("option"),L.textContent="Boolean",c=x(),i(t,"class","inline-block text-sm font-bold text-gray-800 mt-2.5 dark:text-neutral-200"),i(R,"type","text"),i(R,"class","py-2 px-3 pe-11 block w-full border-gray-200 shadow-sm rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600"),i(R,"placeholder","Enter argument name"),i(T,"class","space-y-2"),i(o,"class","inline-block text-sm font-bold text-gray-800 mt-2.5 dark:text-neutral-200"),i(S,"type","text"),i(S,"class","py-2 px-3 pe-11 block w-full border-gray-200 shadow-sm rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600"),i(S,"placeholder","Enter argument description"),i(s,"class","space-y-2"),i(u,"class","inline-block text-sm font-bold text-gray-800 mt-2.5 dark:text-neutral-200"),C.__value="STRING",Ye(C,C.__value),_.__value="NUMERIC",Ye(_,_.__value),L.__value="BOOLEAN",Ye(L,L.__value),i(d,"class","py-2 px-3 pe-11 block w-full border-gray-200 shadow-sm rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600"),E[12].general_type===void 0&&Pt(I),i(N,"class","space-y-2"),i(e,"class","space-y-4")},m(f,m){W(f,e,m),l(e,T),l(T,t),l(T,r),l(T,R),Ye(R,E[12].name),l(e,A),l(e,s),l(s,o),l(s,n),l(s,S),Ye(S,E[12].description),l(e,O),l(e,N),l(N,u),l(N,D),l(N,d),l(d,C),l(d,_),l(d,L),VT(d,E[12].general_type,!0),l(e,c),H||(y=[ae(R,"input",h),ae(S,"input",a),ae(d,"change",I)],H=!0)},p(f,m){E=f,m&2&&R.value!==E[12].name&&Ye(R,E[12].name),m&2&&S.value!==E[12].description&&Ye(S,E[12].description),m&2&&VT(d,E[12].general_type)},d(f){f&&Y(e),H=!1,iE(y)}}}function oi(E){let e;function T(R,A){return R[1]!=null?Si:si}let t=T(E),r=t(E);return{c(){r.c(),e=Ze()},m(R,A){r.m(R,A),W(R,e,A)},p(R,[A]){t===(t=T(R))&&r?r.p(R,A):(r.d(1),r=t(R),r&&(r.c(),r.m(e.parentNode,e)))},i:Z,o:Z,d(R){R&&Y(e),r.d(R)}}}function Oi(E,e,T){let{functionTemplate:t}=e,r=null;function R(){r.function_name=this.value,T(1,r)}function A(){r.description=this.value,T(1,r)}function s(){r.sql_template=this.value,T(1,r)}function o(d,C){d[C].name=this.value,T(1,r)}function n(d,C){d[C].description=this.value,T(1,r)}function S(d,C){d[C].general_type=sn(this),T(1,r)}const O=()=>{T(1,r=null)},N=()=>{r&&(vn(t.function_name,r),T(0,t=r),T(1,r=null))},u=()=>{t&&window.confirm("Are you sure you want to delete this function?")&&Fn(t.function_name)},D=()=>{T(1,r=structuredClone(t))};return E.$$set=d=>{"functionTemplate"in d&&T(0,t=d.functionTemplate)},[t,r,R,A,s,o,n,S,O,N,u,D]}class ZR extends Le{constructor(e){super(),_e(this,e,Oi,oi,Ne,{functionTemplate:0})}}function vr(E,e,T){const t=E.slice();return t[12]=e[T],t}function Fr(E,e,T){const t=E.slice();return t[15]=e[T],t}function Yr(E,e,T){const t=E.slice();return t[18]=e[T],t}function Vr(E,e,T){const t=E.slice();return t[18]=e[T],t}function Wr(E){let e,T;return e=new KA({}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function wr(E){let e,T;return e=new ze({props:{$$slots:{default:[ai]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388610&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function xr(E){let e,T;return e=new CE({props:{message:E[18],onSubmit:LT}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&2&&(R.message=t[18]),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function ii(E){let e=E[1].header+"",T,t,r,R,A=ce(E[1].questions),s=[];for(let n=0;n<A.length;n+=1)s[n]=xr(Vr(E,A,n));const o=n=>B(s[n],1,1,()=>{s[n]=null});return{c(){T=Re(e),t=x();for(let n=0;n<s.length;n+=1)s[n].c();r=Ze()},m(n,S){W(n,T,S),W(n,t,S);for(let O=0;O<s.length;O+=1)s[O]&&s[O].m(n,S);W(n,r,S),R=!0},p(n,S){if((!R||S&2)&&e!==(e=n[1].header+"")&&Pe(T,e),S&2){A=ce(n[1].questions);let O;for(O=0;O<A.length;O+=1){const N=Vr(n,A,O);s[O]?(s[O].p(N,S),G(s[O],1)):(s[O]=xr(N),s[O].c(),G(s[O],1),s[O].m(r.parentNode,r))}for(Ge(),O=A.length;O<s.length;O+=1)o(O);ge()}},i(n){if(!R){for(let S=0;S<A.length;S+=1)G(s[S]);R=!0}},o(n){s=s.filter(Boolean);for(let S=0;S<s.length;S+=1)B(s[S]);R=!1},d(n){n&&(Y(T),Y(t),Y(r)),nE(s,n)}}}function ai(E){let e,T;return e=new IE({props:{$$slots:{default:[ii]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388610&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Ii(E){let e,T;return e=new ze({props:{$$slots:{default:[Hi]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388616&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Ni(E){let e,T;return e=new ze({props:{$$slots:{default:[bi]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388616&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function li(E){let e,T;return e=new ze({props:{$$slots:{default:[yi]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388616&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function _i(E){let e,T;return e=new ze({props:{$$slots:{default:[vi]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388616&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Li(E){let e,T;return e=new YE({props:{message:"Put your SQL here",$$slots:{default:[Fi]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388608&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Ci(E){let e,T,t,r,R,A,s,o,n,S;e=new YE({props:{message:E[15].question}}),t=new ze({props:{$$slots:{default:[Wi]},$$scope:{ctx:E}}}),R=new ze({props:{$$slots:{default:[wi]},$$scope:{ctx:E}}}),s=new ze({props:{$$slots:{default:[xi]},$$scope:{ctx:E}}});let O=E[15].summary&&$r(E);return{c(){k(e.$$.fragment),T=x(),k(t.$$.fragment),r=x(),k(R.$$.fragment),A=x(),k(s.$$.fragment),o=x(),O&&O.c(),n=Ze()},m(N,u){$(e,N,u),W(N,T,u),$(t,N,u),W(N,r,u),$(R,N,u),W(N,A,u),$(s,N,u),W(N,o,u),O&&O.m(N,u),W(N,n,u),S=!0},p(N,u){const D={};u&8&&(D.message=N[15].question),e.$set(D);const d={};u&8388616&&(d.$$scope={dirty:u,ctx:N}),t.$set(d);const C={};u&8388616&&(C.$$scope={dirty:u,ctx:N}),R.$set(C);const _={};u&8388616&&(_.$$scope={dirty:u,ctx:N}),s.$set(_),N[15].summary?O?(O.p(N,u),u&8&&G(O,1)):(O=$r(N),O.c(),G(O,1),O.m(n.parentNode,n)):O&&(Ge(),B(O,1,1,()=>{O=null}),ge())},i(N){S||(G(e.$$.fragment,N),G(t.$$.fragment,N),G(R.$$.fragment,N),G(s.$$.fragment,N),G(O),S=!0)},o(N){B(e.$$.fragment,N),B(t.$$.fragment,N),B(R.$$.fragment,N),B(s.$$.fragment,N),B(O),S=!1},d(N){N&&(Y(T),Y(r),Y(A),Y(o),Y(n)),X(e,N),X(t,N),X(R,N),X(s,N),O&&O.d(N)}}}function ui(E){let e,T;return e=new ze({props:{$$slots:{default:[ki]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388617&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function ci(E){let e,T;return e=new ze({props:{$$slots:{default:[Ki]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388616&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function fi(E){let e,T;return e=new YE({props:{message:"No, the results were not correct."}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p:Z,i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Pi(E){let e,T;return e=new YE({props:{message:"Yes, the results were correct."}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p:Z,i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Di(E){let e,T,t=E[0].ask_results_correct&&kr(E);return{c(){t&&t.c(),e=Ze()},m(r,R){t&&t.m(r,R),W(r,e,R),T=!0},p(r,R){r[0].ask_results_correct?t?(t.p(r,R),R&1&&G(t,1)):(t=kr(r),t.c(),G(t,1),t.m(e.parentNode,e)):t&&(Ge(),B(t,1,1,()=>{t=null}),ge())},i(r){T||(G(t),T=!0)},o(r){B(t),T=!1},d(r){r&&Y(e),t&&t.d(r)}}}function di(E){let e,T,t=E[0].ask_results_correct&&Jr(E);return{c(){t&&t.c(),e=Ze()},m(r,R){t&&t.m(r,R),W(r,e,R),T=!0},p(r,R){r[0].ask_results_correct?t?R&1&&G(t,1):(t=Jr(r),t.c(),G(t,1),t.m(e.parentNode,e)):t&&(Ge(),B(t,1,1,()=>{t=null}),ge())},i(r){T||(G(t),T=!0)},o(r){B(t),T=!1},d(r){r&&Y(e),t&&t.d(r)}}}function pi(E){let e,T;return e=new YE({props:{message:"Change the chart based on these instructions",$$slots:{default:[ji]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388608&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Mi(E){let e,T,t=E[0].chart&&qr(E);return{c(){t&&t.c(),e=Ze()},m(r,R){t&&t.m(r,R),W(r,e,R),T=!0},p(r,R){r[0].chart?t?(t.p(r,R),R&1&&G(t,1)):(t=qr(r),t.c(),G(t,1),t.m(e.parentNode,e)):t&&(Ge(),B(t,1,1,()=>{t=null}),ge())},i(r){T||(G(t),T=!0)},o(r){B(t),T=!1},d(r){r&&Y(e),t&&t.d(r)}}}function Ui(E){let e,T,t=E[0].table&&Zr(E);return{c(){t&&t.c(),e=Ze()},m(r,R){t&&t.m(r,R),W(r,e,R),T=!0},p(r,R){r[0].table?t?(t.p(r,R),R&1&&G(t,1)):(t=Zr(r),t.c(),G(t,1),t.m(e.parentNode,e)):t&&(Ge(),B(t,1,1,()=>{t=null}),ge())},i(r){T||(G(t),T=!0)},o(r){B(t),T=!1},d(r){r&&Y(e),t&&t.d(r)}}}function mi(E){let e,T;return e=new ze({props:{$$slots:{default:[Ta]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388616&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function hi(E){let e,T,t=E[0].sql==!0&&zr(E);return{c(){t&&t.c(),e=Ze()},m(r,R){t&&t.m(r,R),W(r,e,R),T=!0},p(r,R){r[0].sql==!0?t?(t.p(r,R),R&1&&G(t,1)):(t=zr(r),t.c(),G(t,1),t.m(e.parentNode,e)):t&&(Ge(),B(t,1,1,()=>{t=null}),ge())},i(r){T||(G(t),T=!0)},o(r){B(t),T=!1},d(r){r&&Y(e),t&&t.d(r)}}}function Gi(E){let e,T;return e=new YE({props:{message:E[15].question}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8&&(R.message=t[15].question),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function gi(E){let e=JSON.stringify(E[15])+"",T;return{c(){T=Re(e)},m(t,r){W(t,T,r)},p(t,r){r&8&&e!==(e=JSON.stringify(t[15])+"")&&Pe(T,e)},d(t){t&&Y(T)}}}function Hi(E){let e,T;return e=new IE({props:{$$slots:{default:[gi]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388616&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function bi(E){let e,T;return e=new ZR({props:{functionTemplate:E[15].function_template}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8&&(R.functionTemplate=t[15].function_template),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function yi(E){let e,T;return e=new Ai({props:{functionData:E[15].function}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8&&(R.functionData=t[15].function),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Bi(E){let e=E[15].text+"",T;return{c(){T=Re(e)},m(t,r){W(t,T,r)},p(t,r){r&8&&e!==(e=t[15].text+"")&&Pe(T,e)},d(t){t&&Y(T)}}}function vi(E){let e,T,t,r;return e=new IE({props:{$$slots:{default:[Bi]},$$scope:{ctx:E}}}),t=new XA({props:{message:E[15].text}}),{c(){k(e.$$.fragment),T=x(),k(t.$$.fragment)},m(R,A){$(e,R,A),W(R,T,A),$(t,R,A),r=!0},p(R,A){const s={};A&8388616&&(s.$$scope={dirty:A,ctx:R}),e.$set(s);const o={};A&8&&(o.message=R[15].text),t.$set(o)},i(R){r||(G(e.$$.fragment,R),G(t.$$.fragment,R),r=!0)},o(R){B(e.$$.fragment,R),B(t.$$.fragment,R),r=!1},d(R){R&&Y(T),X(e,R),X(t,R)}}}function Fi(E){let e,T;return e=new YA({props:{onSubmit:bn}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p:Z,i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Yi(E){let e=E[15].sql+"",T;return{c(){T=Re(e)},m(t,r){W(t,T,r)},p(t,r){r&8&&e!==(e=t[15].sql+"")&&Pe(T,e)},d(t){t&&Y(T)}}}function Vi(E){let e,T;return e=new GR({props:{$$slots:{default:[Yi]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388616&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Wi(E){let e,T;return e=new IE({props:{$$slots:{default:[Vi]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388616&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function wi(E){let e,T;return e=new UR({props:{id:E[15].id,df:E[15].df}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8&&(R.id=t[15].id),r&8&&(R.df=t[15].df),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function xi(E){let e,T;return e=new mR({props:{fig:E[15].fig}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8&&(R.fig=t[15].fig),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function $r(E){let e,T;return e=new ze({props:{$$slots:{default:[Xi]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388616&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function $i(E){let e=E[15].summary+"",T;return{c(){T=Re(e)},m(t,r){W(t,T,r)},p(t,r){r&8&&e!==(e=t[15].summary+"")&&Pe(T,e)},d(t){t&&Y(T)}}}function Xi(E){let e,T;return e=new IE({props:{$$slots:{default:[$i]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388616&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Xr(E){let e,T;function t(){return E[10](E[15])}return e=new CE({props:{message:"Auto Fix",onSubmit:t}}),{c(){k(e.$$.fragment)},m(r,R){$(e,r,R),T=!0},p(r,R){E=r;const A={};R&8&&(A.onSubmit=t),e.$set(A)},i(r){T||(G(e.$$.fragment,r),T=!0)},o(r){B(e.$$.fragment,r),T=!1},d(r){X(e,r)}}}function ki(E){let e,T,t,r,R,A;e=new fT({props:{message:E[15].error}}),t=new CE({props:{message:"Manually Fix",onSubmit:E[9]}});let s=E[0].auto_fix_sql&&Xr(E);return{c(){k(e.$$.fragment),T=x(),k(t.$$.fragment),r=x(),s&&s.c(),R=Ze()},m(o,n){$(e,o,n),W(o,T,n),$(t,o,n),W(o,r,n),s&&s.m(o,n),W(o,R,n),A=!0},p(o,n){const S={};n&8&&(S.message=o[15].error),e.$set(S),o[0].auto_fix_sql?s?(s.p(o,n),n&1&&G(s,1)):(s=Xr(o),s.c(),G(s,1),s.m(R.parentNode,R)):s&&(Ge(),B(s,1,1,()=>{s=null}),ge())},i(o){A||(G(e.$$.fragment,o),G(t.$$.fragment,o),G(s),A=!0)},o(o){B(e.$$.fragment,o),B(t.$$.fragment,o),B(s),A=!1},d(o){o&&(Y(T),Y(r),Y(R)),X(e,o),X(t,o),s&&s.d(o)}}}function Ki(E){let e,T;return e=new fT({props:{message:E[15].error}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8&&(R.message=t[15].error),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function kr(E){let e,T;return e=new YE({props:{message:"",$$slots:{default:[qi]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388609&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Ji(E){let e,T,t,r=E[0].function_generation&&Kr(E);return T=new CE({props:{message:"Yes, train as Question-SQL pair",onSubmit:E[7]}}),{c(){r&&r.c(),e=x(),k(T.$$.fragment)},m(R,A){r&&r.m(R,A),W(R,e,A),$(T,R,A),t=!0},p(R,A){R[0].function_generation?r?A&1&&G(r,1):(r=Kr(R),r.c(),G(r,1),r.m(e.parentNode,e)):r&&(Ge(),B(r,1,1,()=>{r=null}),ge())},i(R){t||(G(r),G(T.$$.fragment,R),t=!0)},o(R){B(r),B(T.$$.fragment,R),t=!1},d(R){R&&Y(e),r&&r.d(R),X(T,R)}}}function Kr(E){let e,T;return e=new CE({props:{message:"Yes, create function",onSubmit:E[6]}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function qi(E){let e=cT()!==null,T,t,r,R=e&&Ji(E);return t=new CE({props:{message:"No",onSubmit:E[8]}}),{c(){R&&R.c(),T=x(),k(t.$$.fragment)},m(A,s){R&&R.m(A,s),W(A,T,s),$(t,A,s),r=!0},p(A,s){e&&R.p(A,s)},i(A){r||(G(R),G(t.$$.fragment,A),r=!0)},o(A){B(R),B(t.$$.fragment,A),r=!1},d(A){A&&Y(T),R&&R.d(A),X(t,A)}}}function Jr(E){let e,T;return e=new ze({props:{$$slots:{default:[Zi]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Qi(E){let e;return{c(){e=Re("Were the results correct?")},m(T,t){W(T,e,t)},d(T){T&&Y(e)}}}function Zi(E){let e,T;return e=new IE({props:{$$slots:{default:[Qi]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388608&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function ji(E){let e,T;return e=new wA({props:{onSubmit:E[5],placeholder:"Make the line red",buttonText:"Update Chart",currentValue:""}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p:Z,i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function qr(E){let e,T,t,r;e=new ze({props:{$$slots:{default:[zi]},$$scope:{ctx:E}}});let R=E[0].redraw_chart&&Qr(E);return{c(){k(e.$$.fragment),T=x(),R&&R.c(),t=Ze()},m(A,s){$(e,A,s),W(A,T,s),R&&R.m(A,s),W(A,t,s),r=!0},p(A,s){const o={};s&8388616&&(o.$$scope={dirty:s,ctx:A}),e.$set(o),A[0].redraw_chart?R?s&1&&G(R,1):(R=Qr(A),R.c(),G(R,1),R.m(t.parentNode,t)):R&&(Ge(),B(R,1,1,()=>{R=null}),ge())},i(A){r||(G(e.$$.fragment,A),G(R),r=!0)},o(A){B(e.$$.fragment,A),B(R),r=!1},d(A){A&&(Y(T),Y(t)),X(e,A),R&&R.d(A)}}}function zi(E){let e,T;return e=new mR({props:{fig:E[15].fig}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8&&(R.fig=t[15].fig),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Qr(E){let e,T;return e=new ze({props:{$$slots:{default:[ea]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function ea(E){let e,T;return e=new CE({props:{message:"Redraw Chart",onSubmit:yn}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p:Z,i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Zr(E){let e,T;return e=new ze({props:{$$slots:{default:[Ea]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388616&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Ea(E){let e,T;return e=new UR({props:{id:E[15].id,df:E[15].df}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8&&(R.id=t[15].id),r&8&&(R.df=t[15].df),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function jr(E){let e,T;return e=new CE({props:{message:E[18],onSubmit:LT}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8&&(R.message=t[18]),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function ta(E){let e=E[15].header+"",T,t,r,R,A=ce(E[15].questions),s=[];for(let n=0;n<A.length;n+=1)s[n]=jr(Yr(E,A,n));const o=n=>B(s[n],1,1,()=>{s[n]=null});return{c(){T=Re(e),t=x();for(let n=0;n<s.length;n+=1)s[n].c();r=Ze()},m(n,S){W(n,T,S),W(n,t,S);for(let O=0;O<s.length;O+=1)s[O]&&s[O].m(n,S);W(n,r,S),R=!0},p(n,S){if((!R||S&8)&&e!==(e=n[15].header+"")&&Pe(T,e),S&8){A=ce(n[15].questions);let O;for(O=0;O<A.length;O+=1){const N=Yr(n,A,O);s[O]?(s[O].p(N,S),G(s[O],1)):(s[O]=jr(N),s[O].c(),G(s[O],1),s[O].m(r.parentNode,r))}for(Ge(),O=A.length;O<s.length;O+=1)o(O);ge()}},i(n){if(!R){for(let S=0;S<A.length;S+=1)G(s[S]);R=!0}},o(n){s=s.filter(Boolean);for(let S=0;S<s.length;S+=1)B(s[S]);R=!1},d(n){n&&(Y(T),Y(t),Y(r)),nE(s,n)}}}function Ta(E){let e,T;return e=new IE({props:{$$slots:{default:[ta]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388616&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function zr(E){let e,T;return e=new ze({props:{$$slots:{default:[na]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388616&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function ra(E){let e=E[15].text+"",T;return{c(){T=Re(e)},m(t,r){W(t,T,r)},p(t,r){r&8&&e!==(e=t[15].text+"")&&Pe(T,e)},d(t){t&&Y(T)}}}function Ra(E){let e,T;return e=new GR({props:{$$slots:{default:[ra]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388616&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function na(E){let e,T;return e=new IE({props:{$$slots:{default:[Ra]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388616&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function eR(E){let e,T,t,r;const R=[Gi,hi,mi,Ui,Mi,pi,di,Di,Pi,fi,ci,ui,Ci,Li,_i,li,Ni,Ii],A=[];function s(o,n){return o[15].type==="user_question"?0:o[15].type==="sql"?1:o[15].type==="question_list"?2:o[15].type==="df"?3:o[15].type==="plotly_figure"?4:o[15].type==="chart_modification"?5:o[15].type==="feedback_question"?6:o[15].type==="feedback_buttons"?7:o[15].type==="feedback_correct"?8:o[15].type==="feedback_incorrect"?9:o[15].type==="error"?10:o[15].type==="sql_error"?11:o[15].type==="question_cache"?12:o[15].type==="user_sql"?13:o[15].type==="text"?14:o[15].type==="function"?15:o[15].type==="function_template"?16:17}return e=s(E),T=A[e]=R[e](E),{c(){T.c(),t=Ze()},m(o,n){A[e].m(o,n),W(o,t,n),r=!0},p(o,n){let S=e;e=s(o),e===S?A[e].p(o,n):(Ge(),B(A[S],1,1,()=>{A[S]=null}),ge(),T=A[e],T?T.p(o,n):(T=A[e]=R[e](o),T.c()),G(T,1),T.m(t.parentNode,t))},i(o){r||(G(T),r=!0)},o(o){B(T),r=!1},d(o){o&&Y(t),A[e].d(o)}}}function ER(E){let e,T;return e=new fA({}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Aa(E){let e,T;return e=new OA({props:{onSubmit:LT}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p:Z,i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function sa(E){let e,T,t,r;e=new hR({props:{message:"New Question",onSubmit:Ht}});let R=ce(E[3]),A=[];for(let o=0;o<R.length;o+=1)A[o]=TR(vr(E,R,o));const s=o=>B(A[o],1,1,()=>{A[o]=null});return{c(){k(e.$$.fragment),T=x();for(let o=0;o<A.length;o+=1)A[o].c();t=Ze()},m(o,n){$(e,o,n),W(o,T,n);for(let S=0;S<A.length;S+=1)A[S]&&A[S].m(o,n);W(o,t,n),r=!0},p(o,n){if(n&8){R=ce(o[3]);let S;for(S=0;S<R.length;S+=1){const O=vr(o,R,S);A[S]?(A[S].p(O,n),G(A[S],1)):(A[S]=TR(O),A[S].c(),G(A[S],1),A[S].m(t.parentNode,t))}for(Ge(),S=R.length;S<A.length;S+=1)s(S);ge()}},i(o){if(!r){G(e.$$.fragment,o);for(let n=0;n<R.length;n+=1)G(A[n]);r=!0}},o(o){B(e.$$.fragment,o),A=A.filter(Boolean);for(let n=0;n<A.length;n+=1)B(A[n]);r=!1},d(o){o&&(Y(T),Y(t)),X(e,o),nE(A,o)}}}function tR(E){let e,T;function t(){return E[11](E[12])}return e=new hR({props:{message:"Re-Run SQL",onSubmit:t}}),{c(){k(e.$$.fragment)},m(r,R){$(e,r,R),T=!0},p(r,R){E=r;const A={};R&8&&(A.onSubmit=t),e.$set(A)},i(r){T||(G(e.$$.fragment,r),T=!0)},o(r){B(e.$$.fragment,r),T=!1},d(r){X(e,r)}}}function TR(E){let e,T,t=E[12].type==="question_cache"&&tR(E);return{c(){t&&t.c(),e=Ze()},m(r,R){t&&t.m(r,R),W(r,e,R),T=!0},p(r,R){r[12].type==="question_cache"?t?(t.p(r,R),R&8&&G(t,1)):(t=tR(r),t.c(),G(t,1),t.m(e.parentNode,e)):t&&(Ge(),B(t,1,1,()=>{t=null}),ge())},i(r){T||(G(t),T=!0)},o(r){B(t),T=!1},d(r){r&&Y(e),t&&t.d(r)}}}function Sa(E){let e,T,t,r,R,A,s,o,n,S,O,N,u,D,d;t=new jn({});let C=E[0].debug&&Wr(),_=E[1]&&E[1].type=="question_list"&&!E[2]&&wr(E),L=ce(E[3]),c=[];for(let f=0;f<L.length;f+=1)c[f]=eR(Fr(E,L,f));const H=f=>B(c[f],1,1,()=>{c[f]=null});let y=E[4]&&ER();O=new aA({});const h=[sa,Aa],a=[];function I(f,m){return f[2]?0:1}return u=I(E),D=a[u]=h[u](E),{c(){e=P("div"),T=P("div"),k(t.$$.fragment),r=x(),C&&C.c(),R=x(),_&&_.c(),A=x(),s=P("ul");for(let f=0;f<c.length;f+=1)c[f].c();o=x(),y&&y.c(),n=x(),S=P("footer"),k(O.$$.fragment),N=x(),D.c(),i(s,"class","mt-16 space-y-5"),i(T,"class","py-10 lg:py-14"),i(S,"class","max-w-4xl mx-auto sticky bottom-0 z-10 p-3 sm:py-6"),i(e,"class","relative h-screen w-full lg:pl-64")},m(f,m){W(f,e,m),l(e,T),$(t,T,null),l(T,r),C&&C.m(T,null),l(T,R),_&&_.m(T,null),l(T,A),l(T,s);for(let U=0;U<c.length;U+=1)c[U]&&c[U].m(s,null);l(s,o),y&&y.m(s,null),l(e,n),l(e,S),$(O,S,null),l(S,N),a[u].m(S,null),d=!0},p(f,[m]){if(f[0].debug?C?m&1&&G(C,1):(C=Wr(),C.c(),G(C,1),C.m(T,R)):C&&(Ge(),B(C,1,1,()=>{C=null}),ge()),f[1]&&f[1].type=="question_list"&&!f[2]?_?(_.p(f,m),m&6&&G(_,1)):(_=wr(f),_.c(),G(_,1),_.m(T,A)):_&&(Ge(),B(_,1,1,()=>{_=null}),ge()),m&9){L=ce(f[3]);let g;for(g=0;g<L.length;g+=1){const F=Fr(f,L,g);c[g]?(c[g].p(F,m),G(c[g],1)):(c[g]=eR(F),c[g].c(),G(c[g],1),c[g].m(s,o))}for(Ge(),g=L.length;g<c.length;g+=1)H(g);ge()}f[4]?y?m&16&&G(y,1):(y=ER(),y.c(),G(y,1),y.m(s,null)):y&&(Ge(),B(y,1,1,()=>{y=null}),ge());let U=u;u=I(f),u===U?a[u].p(f,m):(Ge(),B(a[U],1,1,()=>{a[U]=null}),ge(),D=a[u],D?D.p(f,m):(D=a[u]=h[u](f),D.c()),G(D,1),D.m(S,null))},i(f){if(!d){G(t.$$.fragment,f),G(C),G(_);for(let m=0;m<L.length;m+=1)G(c[m]);G(y),G(O.$$.fragment,f),G(D),d=!0}},o(f){B(t.$$.fragment,f),B(C),B(_),c=c.filter(Boolean);for(let m=0;m<c.length;m+=1)B(c[m]);B(y),B(O.$$.fragment,f),B(D),d=!1},d(f){f&&Y(e),X(t),C&&C.d(),_&&_.d(),nE(c,f),y&&y.d(),X(O),a[u].d()}}}function oa(E,e,T){let t,r,R,A,s;return RE(E,FE,d=>T(0,t=d)),RE(E,lT,d=>T(1,r=d)),RE(E,Gt,d=>T(2,R=d)),RE(E,Et,d=>T(3,A=d)),RE(E,st,d=>T(4,s=d)),[t,r,R,A,s,d=>{Vn(d)},()=>{Bn()},()=>{Yn()},()=>{WT()},()=>{WT()},d=>{Hn(d.error)},d=>d.type==="question_cache"?fn(d.id):void 0]}class Oa extends Le{constructor(e){super(),_e(this,e,oa,Sa,Ne,{})}}function ia(E){let e,T,t,r,R,A,s,o,n,S,O,N,u,D,d,C,_,L,c;return{c(){e=P("div"),T=P("div"),t=P("div"),r=P("div"),R=P("h3"),R.textContent="Are you sure?",A=x(),s=P("button"),s.innerHTML='<span class="sr-only">Close</span> <svg class="w-3.5 h-3.5" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.258206 1.00652C0.351976 0.912791 0.479126 0.860131 0.611706 0.860131C0.744296 0.860131 0.871447 0.912791 0.965207 1.00652L3.61171 3.65302L6.25822 1.00652C6.30432 0.958771 6.35952 0.920671 6.42052 0.894471C6.48152 0.868271 6.54712 0.854471 6.61352 0.853901C6.67992 0.853321 6.74572 0.865971 6.80722 0.891111C6.86862 0.916251 6.92442 0.953381 6.97142 1.00032C7.01832 1.04727 7.05552 1.1031 7.08062 1.16454C7.10572 1.22599 7.11842 1.29183 7.11782 1.35822C7.11722 1.42461 7.10342 1.49022 7.07722 1.55122C7.05102 1.61222 7.01292 1.6674 6.96522 1.71352L4.31871 4.36002L6.96522 7.00648C7.05632 7.10078 7.10672 7.22708 7.10552 7.35818C7.10442 7.48928 7.05182 7.61468 6.95912 7.70738C6.86642 7.80018 6.74102 7.85268 6.60992 7.85388C6.47882 7.85498 6.35252 7.80458 6.25822 7.71348L3.61171 5.06702L0.965207 7.71348C0.870907 7.80458 0.744606 7.85498 0.613506 7.85388C0.482406 7.85268 0.357007 7.80018 0.264297 7.70738C0.171597 7.61468 0.119017 7.48928 0.117877 7.35818C0.116737 7.22708 0.167126 7.10078 0.258206 7.00648L2.90471 4.36002L0.258206 1.71352C0.164476 1.61976 0.111816 1.4926 0.111816 1.36002C0.111816 1.22744 0.164476 1.10028 0.258206 1.00652Z" fill="currentColor"></path></svg>',o=x(),n=P("div"),S=P("p"),O=Re(E[0]),N=x(),u=P("div"),D=P("button"),D.textContent="Close",d=x(),C=P("button"),_=Re(E[1]),i(R,"class","font-bold text-gray-800 dark:text-white"),i(s,"type","button"),i(s,"class","hs-dropdown-toggle inline-flex flex-shrink-0 justify-center items-center h-8 w-8 rounded-md text-gray-500 hover:text-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2 focus:ring-offset-white transition-all text-sm dark:focus:ring-gray-700 dark:focus:ring-offset-gray-800"),i(s,"data-hs-overlay","#hs-vertically-centered-modal"),i(r,"class","flex justify-between items-center py-3 px-4 border-b dark:border-gray-700"),i(S,"class","text-gray-800 dark:text-gray-400"),i(n,"class","p-4 overflow-y-auto"),i(D,"type","button"),i(D,"class","hs-dropdown-toggle py-3 px-4 inline-flex justify-center items-center gap-2 rounded-md border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 transition-all text-sm dark:bg-slate-900 dark:hover:bg-slate-800 dark:border-gray-700 dark:text-gray-400 dark:hover:text-white dark:focus:ring-offset-gray-800"),i(D,"data-hs-overlay","#hs-vertically-centered-modal"),i(C,"class","py-3 px-4 inline-flex justify-center items-center gap-2 rounded-md border border-transparent font-semibold bg-blue-500 text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-all text-sm dark:focus:ring-offset-gray-800"),i(u,"class","flex justify-end items-center gap-x-2 py-3 px-4 border-t dark:border-gray-700"),i(t,"class","flex flex-col bg-white border shadow-sm rounded-xl dark:bg-gray-800 dark:border-gray-700 dark:shadow-slate-700/[.7]"),i(T,"class","hs-overlay-open:mt-7 hs-overlay-open:opacity-100 hs-overlay-open:duration-500 mt-0 opacity-0 ease-out transition-all sm:max-w-lg sm:w-full m-3 sm:mx-auto min-h-[calc(100%-3.5rem)] flex items-center"),i(e,"class","hs-overlay open w-full h-full fixed top-0 left-0 z-[60] overflow-x-hidden overflow-y-auto")},m(H,y){W(H,e,y),l(e,T),l(T,t),l(t,r),l(r,R),l(r,A),l(r,s),l(t,o),l(t,n),l(n,S),l(S,O),l(t,N),l(t,u),l(u,D),l(u,d),l(u,C),l(C,_),L||(c=[ae(s,"click",function(){ZE(E[2])&&E[2].apply(this,arguments)}),ae(D,"click",function(){ZE(E[2])&&E[2].apply(this,arguments)}),ae(C,"click",function(){ZE(E[3])&&E[3].apply(this,arguments)})],L=!0)},p(H,[y]){E=H,y&1&&Pe(O,E[0]),y&2&&Pe(_,E[1])},i:Z,o:Z,d(H){H&&Y(e),L=!1,iE(c)}}}function aa(E,e,T){let{message:t}=e,{buttonLabel:r}=e,{onClose:R}=e,{onConfirm:A}=e;return E.$$set=s=>{"message"in s&&T(0,t=s.message),"buttonLabel"in s&&T(1,r=s.buttonLabel),"onClose"in s&&T(2,R=s.onClose),"onConfirm"in s&&T(3,A=s.onConfirm)},[t,r,R,A]}class Ia extends Le{constructor(e){super(),_e(this,e,aa,ia,Ne,{message:0,buttonLabel:1,onClose:2,onConfirm:3})}}function rR(E,e,T){const t=E.slice();return t[10]=e[T].name,t[11]=e[T].description,t[12]=e[T].example,t}function RR(E){let e,T,t,r,R,A,s,o,n,S,O,N;return S=nn(E[7][0]),{c(){e=P("div"),T=P("div"),t=P("input"),r=x(),R=P("label"),A=P("span"),A.textContent=`${E[10]}`,s=x(),o=P("span"),o.textContent=`${E[11]}`,n=x(),i(t,"id","hs-radio-"+E[10]),t.__value=E[10],Ye(t,t.__value),i(t,"name","hs-radio-with-description"),i(t,"type","radio"),i(t,"class","border-gray-200 rounded-full text-blue-600 focus:ring-blue-500 dark:bg-gray-800 dark:border-gray-700 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800"),i(t,"aria-describedby","hs-radio-delete-description"),i(T,"class","flex items-center h-5 mt-1"),i(A,"class","block text-sm font-semibold text-gray-800 dark:text-gray-300"),i(o,"id","hs-radio-ddl-description"),i(o,"class","block text-sm text-gray-600 dark:text-gray-500"),i(R,"for","hs-radio-"+E[10]),i(R,"class","ml-3"),i(e,"class","relative flex items-start"),S.p(t)},m(u,D){W(u,e,D),l(e,T),l(T,t),t.checked=t.__value===E[0],l(e,r),l(e,R),l(R,A),l(R,s),l(R,o),l(e,n),O||(N=ae(t,"change",E[6]),O=!0)},p(u,D){D&1&&(t.checked=t.__value===u[0])},d(u){u&&Y(e),S.r(),O=!1,N()}}}function Na(E){let e,T,t,r,R,A,s,o,n,S,O,N,u,D,d,C,_,L,c,H,y,h,a,I,f,m=ce(E[3]),U=[];for(let g=0;g<m.length;g+=1)U[g]=RR(rR(E,m,g));return{c(){var g;e=P("div"),T=P("div"),t=P("div"),r=P("div"),R=P("h2"),R.textContent="Add Training Data",A=x(),s=P("button"),s.innerHTML='<span class="sr-only">Close</span> <svg class="w-3.5 h-3.5" width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.258206 1.00652C0.351976 0.912791 0.479126 0.860131 0.611706 0.860131C0.744296 0.860131 0.871447 0.912791 0.965207 1.00652L3.61171 3.65302L6.25822 1.00652C6.30432 0.958771 6.35952 0.920671 6.42052 0.894471C6.48152 0.868271 6.54712 0.854471 6.61352 0.853901C6.67992 0.853321 6.74572 0.865971 6.80722 0.891111C6.86862 0.916251 6.92442 0.953381 6.97142 1.00032C7.01832 1.04727 7.05552 1.1031 7.08062 1.16454C7.10572 1.22599 7.11842 1.29183 7.11782 1.35822C7.11722 1.42461 7.10342 1.49022 7.07722 1.55122C7.05102 1.61222 7.01292 1.6674 6.96522 1.71352L4.31871 4.36002L6.96522 7.00648C7.05632 7.10078 7.10672 7.22708 7.10552 7.35818C7.10442 7.48928 7.05182 7.61468 6.95912 7.70738C6.86642 7.80018 6.74102 7.85268 6.60992 7.85388C6.47882 7.85498 6.35252 7.80458 6.25822 7.71348L3.61171 5.06702L0.965207 7.71348C0.870907 7.80458 0.744606 7.85498 0.613506 7.85388C0.482406 7.85268 0.357007 7.80018 0.264297 7.70738C0.171597 7.61468 0.119017 7.48928 0.117877 7.35818C0.116737 7.22708 0.167126 7.10078 0.258206 7.00648L2.90471 4.36002L0.258206 1.71352C0.164476 1.61976 0.111816 1.4926 0.111816 1.36002C0.111816 1.22744 0.164476 1.10028 0.258206 1.00652Z" fill="currentColor"></path></svg>',o=x(),n=P("span"),n.textContent="Training Data Type",S=x(),O=P("div");for(let F=0;F<U.length;F+=1)U[F].c();N=x(),u=P("div"),D=P("label"),d=Re("Your "),C=Re(E[0]),_=x(),L=P("div"),c=P("textarea"),y=x(),h=P("div"),a=P("button"),a.textContent="Save",i(R,"class","text-xl text-gray-800 font-bold sm:text-3xl dark:text-white"),i(s,"type","button"),i(s,"class","hs-dropdown-toggle inline-flex flex-shrink-0 justify-center items-center h-8 w-8 rounded-md text-gray-500 hover:text-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2 focus:ring-offset-white transition-all text-sm dark:focus:ring-gray-700 dark:focus:ring-offset-gray-800"),i(s,"data-hs-overlay","#hs-vertically-centered-modal"),i(r,"class","flex justify-between items-center py-3 px-4 border-b dark:border-gray-700 mb-2"),i(n,"class","block mb-2 text-sm font-medium dark:text-white"),i(O,"class","grid space-y-3 mb-1"),i(D,"for","hs-feedback-post-comment-textarea-1"),i(D,"class","block mt-2 mb-2 text-sm font-medium dark:text-white"),i(c,"id","hs-feedback-post-comment-textarea-1"),i(c,"name","hs-feedback-post-comment-textarea-1"),i(c,"rows","3"),i(c,"class","py-3 px-4 block w-full border border-gray-200 rounded-md text-sm focus:border-blue-500 focus:ring-blue-500 sm:p-4 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400"),i(c,"placeholder",H=((g=E[3].find(E[8]))==null?void 0:g.example)??"No example available"),i(L,"class","mt-1"),i(u,"class","mt-2 border-t dark:border-gray-700"),i(a,"class","py-3 px-4 inline-flex justify-center items-center gap-2 rounded-md border border-transparent font-semibold bg-blue-500 text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-all dark:focus:ring-offset-gray-800"),i(h,"class","mt-6 grid"),i(t,"class","mt-5 p-4 relative z-10 bg-white border rounded-xl sm:mt-10 md:p-10 dark:bg-gray-800 dark:border-gray-700"),i(T,"class","mx-auto max-w-2xl"),i(e,"class","max-w-[85rem] px-4 py-10 sm:px-6 lg:px-8 lg:py-14 mx-auto")},m(g,F){W(g,e,F),l(e,T),l(T,t),l(t,r),l(r,R),l(r,A),l(r,s),l(t,o),l(t,n),l(t,S),l(t,O);for(let w=0;w<U.length;w+=1)U[w]&&U[w].m(O,null);l(t,N),l(t,u),l(u,D),l(D,d),l(D,C),l(u,_),l(u,L),l(L,c),Ye(c,E[2]),l(t,y),l(t,h),l(h,a),I||(f=[ae(s,"click",function(){ZE(E[1])&&E[1].apply(this,arguments)}),ae(c,"input",E[9]),ae(a,"click",E[4])],I=!0)},p(g,[F]){var w;if(E=g,F&9){m=ce(E[3]);let K;for(K=0;K<m.length;K+=1){const j=rR(E,m,K);U[K]?U[K].p(j,F):(U[K]=RR(j),U[K].c(),U[K].m(O,null))}for(;K<U.length;K+=1)U[K].d(1);U.length=m.length}F&1&&Pe(C,E[0]),F&1&&H!==(H=((w=E[3].find(E[8]))==null?void 0:w.example)??"No example available")&&i(c,"placeholder",H),F&4&&Ye(c,E[2])},i:Z,o:Z,d(g){g&&Y(e),nE(U,g),I=!1,iE(f)}}}function la(E,e,T){let{onDismiss:t}=e,{onTrain:r}=e,{selectedTrainingDataType:R="SQL"}=e,A=[{name:"DDL",description:"These are the CREATE TABLE statements that define your database structure.",example:"CREATE TABLE table_name (column_1 datatype, column_2 datatype, column_3 datatype);"},{name:"Documentation",description:"This can be any text-based documentation. Keep the chunks small and focused on a single topic.",example:"Our definition of ABC is XYZ."},{name:"SQL",description:"This can be any SQL statement that works. The more the merrier.",example:"SELECT column_1, column_2 FROM table_name;"}],s="";const o=()=>{r(s,R.toLowerCase())},n=[[]];function S(){R=this.__value,T(0,R)}const O=u=>u.name===R;function N(){s=this.value,T(2,s)}return E.$$set=u=>{"onDismiss"in u&&T(1,t=u.onDismiss),"onTrain"in u&&T(5,r=u.onTrain),"selectedTrainingDataType"in u&&T(0,R=u.selectedTrainingDataType)},[R,t,s,A,o,r,S,n,O,N]}class _a extends Le{constructor(e){super(),_e(this,e,la,Na,Ne,{onDismiss:1,onTrain:5,selectedTrainingDataType:0})}}function nR(E,e,T){const t=E.slice();return t[21]=e[T],t}function AR(E,e,T){const t=E.slice();return t[24]=e[T],t}function sR(E,e,T){const t=E.slice();return t[24]=e[T],t}function SR(E){let e,T;return e=new _a({props:{onDismiss:E[13],onTrain:E[0]}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&1&&(R.onTrain=t[0]),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function La(E){let e;return{c(){e=Re("Action")},m(T,t){W(T,e,t)},p:Z,d(T){T&&Y(e)}}}function Ca(E){let e=E[24]+"",T;return{c(){T=Re(e)},m(t,r){W(t,T,r)},p:Z,d(t){t&&Y(T)}}}function oR(E){let e,T,t,r;function R(o,n){return o[24]!="id"?Ca:La}let s=R(E)(E);return{c(){e=P("th"),T=P("div"),t=P("span"),s.c(),r=x(),i(t,"class","text-xs font-semibold uppercase tracking-wide text-gray-800 dark:text-gray-200"),i(T,"class","flex items-center gap-x-2"),i(e,"scope","col"),i(e,"class","px-6 py-3 text-left")},m(o,n){W(o,e,n),l(e,T),l(T,t),s.m(t,null),l(e,r)},p(o,n){s.p(o,n)},d(o){o&&Y(e),s.d()}}}function ua(E){let e,T,t;function r(){return E[18](E[21],E[24])}return{c(){e=P("button"),e.textContent="Delete",i(e,"type","button"),i(e,"class","py-2 px-3 inline-flex justify-center items-center gap-2 rounded-md border-2 border-red-200 font-semibold text-red-500 hover:text-white hover:bg-red-500 hover:border-red-500 focus:outline-none focus:ring-2 focus:ring-red-200 focus:ring-offset-2 transition-all text-sm dark:focus:ring-offset-gray-800")},m(R,A){W(R,e,A),T||(t=ae(e,"click",r),T=!0)},p(R,A){E=R},d(R){R&&Y(e),T=!1,t()}}}function ca(E){let e,T=E[21][E[24]]+"",t;return{c(){e=P("span"),t=Re(T),i(e,"class","text-gray-800 dark:text-gray-200")},m(r,R){W(r,e,R),l(e,t)},p(r,R){R&16&&T!==(T=r[21][r[24]]+"")&&Pe(t,T)},d(r){r&&Y(e)}}}function iR(E){let e,T;function t(A,s){return A[24]!="id"?ca:ua}let R=t(E)(E);return{c(){e=P("td"),T=P("div"),R.c(),i(T,"class","px-6 py-3"),i(e,"class","h-px w-px ")},m(A,s){W(A,e,s),l(e,T),R.m(T,null)},p(A,s){R.p(A,s)},d(A){A&&Y(e),R.d()}}}function aR(E){let e,T,t=ce(E[8]),r=[];for(let R=0;R<t.length;R+=1)r[R]=iR(AR(E,t,R));return{c(){e=P("tr");for(let R=0;R<r.length;R+=1)r[R].c();T=x()},m(R,A){W(R,e,A);for(let s=0;s<r.length;s+=1)r[s]&&r[s].m(e,null);l(e,T)},p(R,A){if(A&304){t=ce(R[8]);let s;for(s=0;s<t.length;s+=1){const o=AR(R,t,s);r[s]?r[s].p(o,A):(r[s]=iR(o),r[s].c(),r[s].m(e,T))}for(;s<r.length;s+=1)r[s].d(1);r.length=t.length}},d(R){R&&Y(e),nE(r,R)}}}function IR(E){let e,T;return e=new Ia({props:{message:"Are you sure you want to delete this?",buttonLabel:"Delete",onClose:E[19],onConfirm:E[20]}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&32&&(R.onClose=t[19]),r&34&&(R.onConfirm=t[20]),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function fa(E){let e,T,t,r,R,A,s,o,n,S,O,N,u,D,d,C,_,L,c,H,y,h,a,I,f,m,U,g=E[2]+1+"",F,w,K=Math.min(E[3],E[7].length)+"",j,pe,se,le,Ue,ye,tE,dE,me,fE,TE,pE,tt,Tt,Ve=E[6]&&SR(E),ME=ce(E[8]),xe=[];for(let Ee=0;Ee<ME.length;Ee+=1)xe[Ee]=oR(sR(E,ME,Ee));let je=ce(E[4]),ve=[];for(let Ee=0;Ee<je.length;Ee+=1)ve[Ee]=aR(nR(E,je,Ee));let Fe=E[5]!=null&&IR(E);return{c(){Ve&&Ve.c(),e=x(),T=P("div"),t=P("div"),r=P("div"),R=P("div"),A=P("div"),s=P("div"),o=P("div"),o.innerHTML='<h2 class="text-xl font-semibold text-gray-800 dark:text-gray-200">Training Data</h2> <p class="text-sm text-gray-600 dark:text-gray-400">Add or remove training data. Good training data is the key to accuracy.</p>',n=x(),S=P("div"),O=P("div"),N=P("button"),N.textContent="View all",u=x(),D=P("button"),D.innerHTML=`<svg class="w-3 h-3" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M2.63452 7.50001L13.6345 7.5M8.13452 13V2" stroke="currentColor" stroke-width="2" stroke-linecap="round"></path></svg>
                    Add training data`,d=x(),C=P("table"),_=P("thead"),L=P("tr");for(let Ee=0;Ee<xe.length;Ee+=1)xe[Ee].c();c=x(),H=P("tbody");for(let Ee=0;Ee<ve.length;Ee+=1)ve[Ee].c();y=x(),h=P("div"),a=P("div"),I=P("p"),I.textContent="Showing:",f=x(),m=P("div"),U=P("span"),F=Re(g),w=Re(" - "),j=Re(K),pe=x(),se=P("p"),se.textContent=`of ${E[7].length}`,le=x(),Ue=P("div"),ye=P("div"),tE=P("button"),tE.innerHTML=`<svg class="w-3 h-3" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"></path></svg>
                    Prev`,dE=x(),me=P("button"),me.innerHTML=`Next
                    <svg class="w-3 h-3" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"></path></svg>`,fE=x(),Fe&&Fe.c(),TE=Ze(),i(N,"class","py-2 px-3 inline-flex justify-center items-center gap-2 rounded-md border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 transition-all text-sm dark:bg-slate-900 dark:hover:bg-slate-800 dark:border-gray-700 dark:text-gray-400 dark:hover:text-white dark:focus:ring-offset-gray-800"),i(D,"class","py-2 px-3 inline-flex justify-center items-center gap-2 rounded-md border border-transparent font-semibold bg-blue-500 text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-all text-sm dark:focus:ring-offset-gray-800"),i(O,"class","inline-flex gap-x-2"),i(s,"class","px-6 py-4 grid gap-3 md:flex md:justify-between md:items-center border-b border-gray-200 dark:border-gray-700"),i(_,"class","bg-gray-50 dark:bg-slate-800"),i(H,"class","divide-y divide-gray-200 dark:divide-gray-700"),i(C,"class","min-w-full divide-y divide-gray-200 dark:divide-gray-700"),i(I,"class","text-sm text-gray-600 dark:text-gray-400"),i(U,"class","py-2 px-3 pr-9 block w-full border-gray-200 rounded-md text-sm focus:border-blue-500 focus:ring-blue-500 dark:bg-slate-900 dark:border-gray-700 dark:text-gray-400"),i(m,"class","max-w-sm space-y-3"),i(se,"class","text-sm text-gray-600 dark:text-gray-400"),i(a,"class","inline-flex items-center gap-x-2"),i(tE,"type","button"),i(tE,"class","py-2 px-3 inline-flex justify-center items-center gap-2 rounded-md border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 transition-all text-sm dark:bg-slate-900 dark:hover:bg-slate-800 dark:border-gray-700 dark:text-gray-400 dark:hover:text-white dark:focus:ring-offset-gray-800"),i(me,"type","button"),i(me,"class","py-2 px-3 inline-flex justify-center items-center gap-2 rounded-md border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 transition-all text-sm dark:bg-slate-900 dark:hover:bg-slate-800 dark:border-gray-700 dark:text-gray-400 dark:hover:text-white dark:focus:ring-offset-gray-800"),i(ye,"class","inline-flex gap-x-2"),i(h,"class","px-6 py-4 grid gap-3 md:flex md:justify-between md:items-center border-t border-gray-200 dark:border-gray-700"),i(A,"class","bg-white border border-gray-200 rounded-xl shadow-sm overflow-hidden dark:bg-slate-900 dark:border-gray-700"),i(R,"class","p-1.5 min-w-full inline-block align-middle"),i(r,"class","-m-1.5 overflow-x-auto"),i(t,"class","flex flex-col"),i(T,"class","max-w-[85rem] px-4 py-10 sm:px-6 lg:px-8 lg:py-14 mx-auto")},m(Ee,Xe){Ve&&Ve.m(Ee,Xe),W(Ee,e,Xe),W(Ee,T,Xe),l(T,t),l(t,r),l(r,R),l(R,A),l(A,s),l(s,o),l(s,n),l(s,S),l(S,O),l(O,N),l(O,u),l(O,D),l(A,d),l(A,C),l(C,_),l(_,L);for(let Ae=0;Ae<xe.length;Ae+=1)xe[Ae]&&xe[Ae].m(L,null);l(C,c),l(C,H);for(let Ae=0;Ae<ve.length;Ae+=1)ve[Ae]&&ve[Ae].m(H,null);l(A,y),l(A,h),l(h,a),l(a,I),l(a,f),l(a,m),l(m,U),l(U,F),l(U,w),l(U,j),l(a,pe),l(a,se),l(h,le),l(h,Ue),l(Ue,ye),l(ye,tE),l(ye,dE),l(ye,me),W(Ee,fE,Xe),Fe&&Fe.m(Ee,Xe),W(Ee,TE,Xe),pE=!0,tt||(Tt=[ae(N,"click",E[11]),ae(D,"click",E[12]),ae(tE,"click",E[9]),ae(me,"click",E[10])],tt=!0)},p(Ee,[Xe]){if(Ee[6]?Ve?(Ve.p(Ee,Xe),Xe&64&&G(Ve,1)):(Ve=SR(Ee),Ve.c(),G(Ve,1),Ve.m(e.parentNode,e)):Ve&&(Ge(),B(Ve,1,1,()=>{Ve=null}),ge()),Xe&256){ME=ce(Ee[8]);let Ae;for(Ae=0;Ae<ME.length;Ae+=1){const gE=sR(Ee,ME,Ae);xe[Ae]?xe[Ae].p(gE,Xe):(xe[Ae]=oR(gE),xe[Ae].c(),xe[Ae].m(L,null))}for(;Ae<xe.length;Ae+=1)xe[Ae].d(1);xe.length=ME.length}if(Xe&304){je=ce(Ee[4]);let Ae;for(Ae=0;Ae<je.length;Ae+=1){const gE=nR(Ee,je,Ae);ve[Ae]?ve[Ae].p(gE,Xe):(ve[Ae]=aR(gE),ve[Ae].c(),ve[Ae].m(H,null))}for(;Ae<ve.length;Ae+=1)ve[Ae].d(1);ve.length=je.length}(!pE||Xe&4)&&g!==(g=Ee[2]+1+"")&&Pe(F,g),(!pE||Xe&8)&&K!==(K=Math.min(Ee[3],Ee[7].length)+"")&&Pe(j,K),Ee[5]!=null?Fe?(Fe.p(Ee,Xe),Xe&32&&G(Fe,1)):(Fe=IR(Ee),Fe.c(),G(Fe,1),Fe.m(TE.parentNode,TE)):Fe&&(Ge(),B(Fe,1,1,()=>{Fe=null}),ge())},i(Ee){pE||(G(Ve),G(Fe),pE=!0)},o(Ee){B(Ve),B(Fe),pE=!1},d(Ee){Ee&&(Y(e),Y(T),Y(fE),Y(TE)),Ve&&Ve.d(Ee),nE(xe,Ee),nE(ve,Ee),Fe&&Fe.d(Ee),tt=!1,iE(Tt)}}}function Pa(E,e,T){let{df:t}=e,{onTrain:r}=e,{removeTrainingData:R}=e,A=JSON.parse(t),s=A.length>0?Object.keys(A[0]):[],o=10,n=1,S=Math.ceil(A.length/o),O=(n-1)*o,N=n*o,u=A.slice(O,N);const D=()=>{n>1&&T(16,n--,n)},d=()=>{n<S&&T(16,n++,n)},C=()=>{T(16,n=1),T(15,o=A.length)};let _=null,L=!1;const c=()=>{T(6,L=!0)},H=()=>{T(6,L=!1)},y=(I,f)=>{T(5,_=I[f])},h=()=>{T(5,_=null)},a=()=>{_&&R(_)};return E.$$set=I=>{"df"in I&&T(14,t=I.df),"onTrain"in I&&T(0,r=I.onTrain),"removeTrainingData"in I&&T(1,R=I.removeTrainingData)},E.$$.update=()=>{E.$$.dirty&98304&&T(2,O=(n-1)*o),E.$$.dirty&98304&&T(3,N=n*o),E.$$.dirty&12&&T(4,u=A.slice(O,N)),E.$$.dirty&32768&&T(17,S=Math.ceil(A.length/o)),E.$$.dirty&196608&&console.log(n,S)},[r,R,O,N,u,_,L,A,s,D,d,C,c,H,t,o,n,S,y,h,a]}class Da extends Le{constructor(e){super(),_e(this,e,Pa,fa,Ne,{df:14,onTrain:0,removeTrainingData:1})}}function da(E){let e;return{c(){e=P("div"),e.innerHTML='<div class="flex flex-auto flex-col justify-center items-center p-4 md:p-5"><div class="flex justify-center"><div class="animate-spin inline-block w-6 h-6 border-[3px] border-current border-t-transparent text-blue-600 rounded-full" role="status" aria-label="loading"><span class="sr-only">Loading...</span></div></div></div>',i(e,"class","min-h-[15rem] flex flex-col bg-white border shadow-sm rounded-xl dark:bg-gray-800 dark:border-gray-700 dark:shadow-slate-700/[.7]")},m(T,t){W(T,e,t)},p:Z,i:Z,o:Z,d(T){T&&Y(e)}}}function pa(E){let e,T,t,r;const R=[Ua,Ma],A=[];function s(o,n){return o[0].type==="df"?0:o[0].type==="error"?1:-1}return~(e=s(E))&&(T=A[e]=R[e](E)),{c(){T&&T.c(),t=Ze()},m(o,n){~e&&A[e].m(o,n),W(o,t,n),r=!0},p(o,n){let S=e;e=s(o),e===S?~e&&A[e].p(o,n):(T&&(Ge(),B(A[S],1,1,()=>{A[S]=null}),ge()),~e?(T=A[e],T?T.p(o,n):(T=A[e]=R[e](o),T.c()),G(T,1),T.m(t.parentNode,t)):T=null)},i(o){r||(G(T),r=!0)},o(o){B(T),r=!1},d(o){o&&Y(t),~e&&A[e].d(o)}}}function Ma(E){let e,T;return e=new fT({props:{message:E[0].error}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&1&&(R.message=t[0].error),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Ua(E){let e,T;return e=new Da({props:{df:E[0].df,removeTrainingData:pn,onTrain:Gn}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&1&&(R.df=t[0].df),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function ma(E){let e,T,t,r,R;const A=[pa,da],s=[];function o(n,S){return n[0]!==null?0:1}return t=o(E),r=s[t]=A[t](E),{c(){e=P("div"),T=P("div"),r.c(),i(T,"class","py-10 lg:py-14"),i(e,"class","relative h-screen w-full lg:pl-64")},m(n,S){W(n,e,S),l(e,T),s[t].m(T,null),R=!0},p(n,[S]){let O=t;t=o(n),t===O?s[t].p(n,S):(Ge(),B(s[O],1,1,()=>{s[O]=null}),ge(),r=s[t],r?r.p(n,S):(r=s[t]=A[t](n),r.c()),G(r,1),r.m(T,null))},i(n){R||(G(r),R=!0)},o(n){B(r),R=!1},d(n){n&&Y(e),s[t].d()}}}function ha(E,e,T){let t;return RE(E,ht,r=>T(0,t=r)),[t]}class Ga extends Le{constructor(e){super(),_e(this,e,ha,ma,Ne,{})}}function ga(E){let e;return{c(){e=P("body"),e.innerHTML=`<div class="max-w-[50rem] flex flex-col mx-auto size-full"><header class="mb-auto flex justify-center z-50 w-full py-4"><nav class="px-4 sm:px-6 lg:px-8" aria-label="Global"><span class="flex-none text-xl font-semibold sm:text-3xl dark:text-white">Vanna.AI</span></nav></header> <div class="text-center py-10 px-4 sm:px-6 lg:px-8"><h1 class="block text-7xl font-bold text-gray-800 sm:text-9xl dark:text-white">No Training Data</h1> <h1 class="block text-2xl font-bold text-white">Did you read the docs?</h1> <p class="mt-3 text-gray-600 dark:text-gray-400">Oops, something went wrong.</p> <p class="text-gray-600 dark:text-gray-400">You need some training data before you can use Vanna</p> <div class="mt-5 flex flex-col justify-center items-center gap-2 sm:flex-row sm:gap-3"><a class="w-full sm:w-auto py-3 px-4 inline-flex justify-center items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-gray-600" href="https://github.com/htmlstreamofficial/preline/tree/main/examples/html" target="_blank"><svg class="flex-shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg>
            Get the source code</a> <a class="w-full sm:w-auto py-3 px-4 inline-flex justify-center items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent text-blue-600 hover:text-blue-800 disabled:opacity-50 disabled:pointer-events-none dark:text-blue-500 dark:hover:text-blue-400 dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-gray-600" href="../examples.html"><svg class="flex-shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m15 18-6-6 6-6"></path></svg>
            Back to examples</a></div></div> <footer class="mt-auto text-center py-5"><div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"><p class="text-sm text-gray-500">© All Rights Reserved. 2022.</p></div></footer></div>`,i(e,"class","flex h-full")},m(T,t){W(T,e,t)},p:Z,i:Z,o:Z,d(T){T&&Y(e)}}}class Ha extends Le{constructor(e){super(),_e(this,e,null,ga,Ne,{})}}function ba(E){let e,T,t;return{c(){e=P("div"),T=P("div"),t=P("div"),i(t,"class","mt-7 bg-white border border-gray-200 rounded-xl shadow-sm dark:bg-gray-800 dark:border-gray-700"),i(T,"class","w-full max-w-md mx-auto p-6"),i(e,"class","dark:bg-slate-900 bg-gray-100 flex h-screen items-center py-16")},m(r,R){W(r,e,R),l(e,T),l(T,t),t.innerHTML=E[0]},p(r,[R]){R&1&&(t.innerHTML=r[0])},i:Z,o:Z,d(r){r&&Y(e)}}}function ya(E,e,T){let t;return RE(E,gt,r=>T(0,t=r)),[t]}class Ba extends Le{constructor(e){super(),_e(this,e,ya,ba,Ne,{})}}function va(E){let e,T,t,r,R,A;return{c(){e=P("div"),T=P("div"),T.innerHTML='<h3 class="text-lg font-bold text-gray-800 dark:text-white">New</h3> <p class="mt-1 text-xs font-medium uppercase text-gray-500 dark:text-neutral-500">Create a New Function</p>',t=x(),r=P("button"),r.innerHTML=`Create
    <svg class="flex-shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m9 18 6-6-6-6"></path></svg>`,i(r,"class","mt-3 inline-flex items-center gap-x-1 text-sm font-semibold rounded-lg border border-transparent text-green-600 hover:text-green-800 disabled:opacity-50 disabled:pointer-events-none dark:text-green-500 dark:hover:text-green-400"),i(e,"class","p-4 flex flex-col justify-between bg-white border border-t-4 border-t-green-600 shadow-sm rounded-xl dark:bg-neutral-900 dark:border-neutral-700 dark:border-t-green-500 dark:shadow-neutral-700/70")},m(s,o){W(s,e,o),l(e,T),l(e,t),l(e,r),R||(A=ae(r,"click",E[0]),R=!0)},p:Z,i:Z,o:Z,d(s){s&&Y(e),R=!1,A()}}}function Fa(E){return[()=>{uT()}]}class Ya extends Le{constructor(e){super(),_e(this,e,Fa,va,Ne,{})}}function NR(E,e,T){const t=E.slice();return t[1]=e[T],t}function lR(E){let e,T;return e=new IE({props:{$$slots:{default:[Va]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Va(E){let e;return{c(){e=Re("No functions found")},m(T,t){W(T,e,t)},d(T){T&&Y(e)}}}function _R(E){let e,T;return e=new ZR({props:{functionTemplate:E[1]}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&1&&(R.functionTemplate=t[1]),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Wa(E){let e,T,t,r,R,A,s,o,n,S=E[0].length==0&&lR(E),O=ce(E[0]),N=[];for(let D=0;D<O.length;D+=1)N[D]=_R(NR(E,O,D));const u=D=>B(N[D],1,1,()=>{N[D]=null});return o=new Ya({}),{c(){e=P("div"),T=P("div"),t=P("h1"),t.textContent="Functions",r=x(),S&&S.c(),R=x(),A=P("div");for(let D=0;D<N.length;D+=1)N[D].c();s=x(),k(o.$$.fragment),i(t,"class","text-3xl font-bold text-gray-800 sm:text-4xl dark:text-white text-center"),i(A,"class","grid grid-cols-4 gap-4 p-4"),i(T,"class","py-10 lg:py-14"),i(e,"class","relative h-screen w-full lg:pl-64")},m(D,d){W(D,e,d),l(e,T),l(T,t),l(T,r),S&&S.m(T,null),l(T,R),l(T,A);for(let C=0;C<N.length;C+=1)N[C]&&N[C].m(A,null);l(A,s),$(o,A,null),n=!0},p(D,[d]){if(D[0].length==0?S?d&1&&G(S,1):(S=lR(D),S.c(),G(S,1),S.m(T,R)):S&&(Ge(),B(S,1,1,()=>{S=null}),ge()),d&1){O=ce(D[0]);let C;for(C=0;C<O.length;C+=1){const _=NR(D,O,C);N[C]?(N[C].p(_,d),G(N[C],1)):(N[C]=_R(_),N[C].c(),G(N[C],1),N[C].m(A,s))}for(Ge(),C=O.length;C<N.length;C+=1)u(C);ge()}},i(D){if(!n){G(S);for(let d=0;d<O.length;d+=1)G(N[d]);G(o.$$.fragment,D),n=!0}},o(D){B(S),N=N.filter(Boolean);for(let d=0;d<N.length;d+=1)B(N[d]);B(o.$$.fragment,D),n=!1},d(D){D&&Y(e),S&&S.d(),nE(N,D),X(o)}}}function wa(E,e,T){let t;return RE(E,dR,r=>T(0,t=r)),[t]}class xa extends Le{constructor(e){super(),_e(this,e,wa,Wa,Ne,{})}}function LR(E){let e,T;return e=new $n({}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function $a(E){let e,T;return e=new IE({props:{$$slots:{default:[Qa]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Xa(E){let e,T;return e=new xa({}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function ka(E){let e,T;return e=new Ba({}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Ka(E){let e,T;return e=new Ha({}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Ja(E){let e,T;return e=new Ga({}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function qa(E){let e,T;return e=new Oa({}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Qa(E){let e;return{c(){e=Re("Unknown page")},m(T,t){W(T,e,t)},d(T){T&&Y(e)}}}function Za(E){let e,T,t,r,R,A=E[0]!=="login"&&LR();const s=[qa,Ja,Ka,ka,Xa,$a],o=[];function n(S,O){return S[0]==="chat"?0:S[0]==="training-data"?1:S[0]==="no-training-data"?2:S[0]==="login"?3:S[0]==="functions"?4:5}return t=n(E),r=o[t]=s[t](E),{c(){e=P("main"),A&&A.c(),T=x(),r.c()},m(S,O){W(S,e,O),A&&A.m(e,null),l(e,T),o[t].m(e,null),R=!0},p(S,[O]){S[0]!=="login"?A?O&1&&G(A,1):(A=LR(),A.c(),G(A,1),A.m(e,T)):A&&(Ge(),B(A,1,1,()=>{A=null}),ge());let N=t;t=n(S),t!==N&&(Ge(),B(o[N],1,1,()=>{o[N]=null}),ge(),r=o[t],r||(r=o[t]=s[t](S),r.c()),G(r,1),r.m(e,null))},i(S){R||(G(A),G(r),R=!0)},o(S){B(A),B(r),R=!1},d(S){S&&Y(e),A&&A.d(),o[t].d()}}}function ja(E,e,T){let t;return RE(E,DE,r=>T(0,t=r)),fR(async()=>{Dn(),Pn();const R=new URL(window.location.href).hash.slice(1);R==="training-data"?pR():R==="functions"?CT():uT()}),[t]}class za extends Le{constructor(e){super(),_e(this,e,ja,Za,Ne,{})}}new za({target:document.getElementById("app")});
'''